Verizon – Java Interview Questions
Here is the list Java Interview Questions which are recently asked in Verizon company. These questions are included for both Freshers and Experienced professionals.
1. What is polymorphism in Java?
Polymorphism is the ability of an object to take many forms that can perform a single action in different ways. There are two types of polymorphism in Java: compile-time polymorphism and runtime polymorphism.
2. What is abstraction in Java?
Abstraction is a process of hiding the implementation details and showing only functionality to the user. Another way, it shows only essential things to the user and hides the internal details, for example, sending SMS where you type the text and send the message.
3. Abstraction vs. Encapsulation?
Abstraction is the method of hiding the unwanted information whereas encapsulation is a method to hide the data in a single entity or unit along with a method to protect information from outside.
4. Difference between Interfaces and Abstract Classes?
Abstract class can have final, non-final, static and non-static variables. The interface has only static and final variables. Multiple implementations: An interface can extend another Java interface only; an abstract class can extend another Java class and implement multiple Java interfaces.
5. How to create a immutable object in Java? Count all benefits?
- Don't provide “setter” methods or methods that modify fields or objects referred to by fields.
- Make all fields final and private.
- Don't allow subclasses to override methods.
- Always remember that your instance variables will be either mutable or immutable.
6. Is Java Pass by Reference or Pass by Value?
Java always passes parameter variables by value. Object variables in Java always point to the real object in the memory heap. A mutable object's value can be changed when it is passed to a method. “Passing by reference” refers to passing the real reference of the variable in memory.
7. What do you understand by Java?
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.It can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network.
Free PDF : Get our updated Java Course Content pdf
8. Outline the major Java features.
- Object Oriented.
- Platform Independent.
- Simple, Secure.
- Portable, Robust.
9. What is a class in Java?
A class is a template used to create objects and to define object data types and methods. Classes are categories, and objects are items within each category. All class objects should have the basic class properties.
10. Differentiate between JDK, JRE, and JVM.
JDK is a software development kit whereas JRE is a software bundle that allows Java program to run, whereas JVM is an environment for executing bytecode. The full form of JDK is Java Development Kit, while the full form of JRE is Java Runtime Environment, while the full form of JVM is Java Virtual Machine.
11. Define inheritance.
Inheritance is an important pillar of OOP (Object-Oriented Programming) which is the mechanism in java by which one class is allowed to inherit the features(fields and methods) of another class.
12. Explain method overloading.
Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java that allows a class to have more than one constructor having different argument lists.
13. Compare overloading with overriding.
Overriding implements Runtime Polymorphism whereas overloading implements Compile time polymorphism. Overloaded method names are the same but the parameters are different. With Overloading, the method to call is determined at the compile-time.
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.