Infosys – Java Interview Questions
Here is the list Java Interview Questions which are recently asked in Infosys company. These questions are included for both Freshers and Experienced professionals.
1. What is JAVA?
Java is a general-purpose object-oriented programming language designed as a computing platform for application development. Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network.
2. What are the features in JAVA?
Java is an efficient, dynamic language which supports the dynamic loading of classes. It means classes are loaded on demand. It also supports dynamic compilation, automatic memory management, functions from its native languages, i.e., C and C++.
3. How does Java enable high performance?
Java uses Just-In-Time compiler to enable high performance which is a program that turns Java bytecode and contains instructions that must be interpreted into instructions to be sent directly to the processor.
4. What are the Java IDE’s?
Java IDE is an an integrated development environment that offers comprehensive facilities to programmers for software development. An IDE generally contains a source code editor, a debugger, build automation tools.
5. What do you mean by Constructor?
In Java, a constructor is a block of codes similar to the method. It is called when an instance of the class is created. At the time of calling constructor, memory for the object is allocated in the memory. It is a special type of method which is used to initialize the object.
6. What is meant by Local variable and Instance variable?
The main difference between instance variable and local variable is that instance variable is a variable that is declared in a class but outside a method, while a local variable is a variable declared within a method or a constructor.
7. What is a Class?
Class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type.
8. What is an Object?
A Java object is a combination of data and procedures working on the available data. An object has a state and behaviour.Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
Free PDF : Get our updated Java Course Content pdf
9. What are the Oops concepts?
OOPs stand for Object-oriented programming which organizes a program around the various objects and well-defined interfaces. The OOPs Concepts in Java are abstraction, encapsulation, inheritance, and polymorphism and aims to implement real-world entities in programs.
10. What is Inheritance?
Inheritance can be defined as the process where one class acquires the properties of another. The class which inherits the properties of other is known as subclass and the class whose properties are inherited is known as superclass.
11. What is Encapsulation?
Encapsulation is one of the fundamental concepts in object-oriented programming. It describes the idea of bundling data and methods that work on that data within one unit, e.g., a class in Java.
12. What is Polymorphism?
Polymorphism means many forms and can point to different object at different time. In other words, the actual object to which a reference type refers can be determined at runtime. Polymorphism is based on inheritance and overriding.
13. What is meant by Method Overriding?
Method overridingis a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its super classes or parent classes.
14. What is meant by Overloading?
Method overloading is a feature of Java in which a class has more than one method of the same name and their parameters are different. When more than one method of the same name is created in a Class, this type of method is called Overloaded Methods.
15. What is meant by Interface?
An interface in Java is a blueprint of a class which has static constants and abstract methods. The interface in Java is a mechanism to achieve abstraction and multiple inheritances in Java.There can be only abstract methods in the Java interface, not method body.
16. What is meant by Abstract class?
An abstract class is a class that is declared abstract that may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class.
Get Answer for all the above questions and place in your dream company
Wants to Become an ExpertKnow More
TOP MNC's JAVA INTERVIEW QUESTIONS & ANSWERS
Here we listed all Java Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Java.