Java Interview Questions:
1. What is Java? And What are the main features of Java?
2. Why is Java platform-independent?
3. What is the difference between a class and an object?
4. What is Variable and its types?
5. What is datatype and its types?
6. What are the formulas we have to retrieve the default value, size,
minimum and maximum values of primitive datatypes.
7. What is the difference between Global Variable and Local Variable?
8. What is the difference between static and non-static field?
9. What is the difference between == and .equals() in Java?
[Link] do you compare two strings ignoring case?
[Link] are the types of operators in Java?
[Link] is the output of 10 + 20 + "Java"?
[Link] are control flow statements in Java?
[Link] between if-else and switch?
[Link] we use a string in a switch statement?
[Link] is the difference between break and continue?
[Link] does a for-each loop work?
[Link] you use a loop inside another loop? Give an example.
[Link] is an array in Java?
[Link] do you declare and initialize an array?
[Link] is the default value of array elements?
[Link] do you find the length of an array?
[Link] we store different data types in an array?
[Link] is the difference between a one-dimensional and two-dimensional
array?
[Link] is method overloading?
[Link] are the access modifiers in Java?
[Link] between public, private, protected, and default access?
[Link] we access a private method from another class?
[Link] is the use of protected in inheritance?
[Link] is the default access modifier in Java?
[Link] are the main pillars of OOPs?
[Link] is inheritance? Explain types of inheritance in Java.
[Link] is polymorphism? Difference between compile-time and runtime
polymorphism.
[Link] is encapsulation?
[Link] is abstraction?
[Link] is a constructor in Java?
[Link] are the types of constructors?
[Link] is the difference between constructor and method?
[Link] is the difference between Array List and Object Array
[Link] is an exception in Java?
[Link] between checked and unchecked exceptions?
[Link] Java what is reverse of string and palindrome
[Link] the program for array list how to find out the repeated number?
[Link] a Java program to find largest among three numbers?
[Link] a Java program to reverse a number?
[Link] a Java Program to print numbers from 1 to 10
[Link] a Java program to check leap year?
[Link] a Java Program to add two numbers?
[Link] a program to check Even or Odd?
[Link] a Java Program to swap two numbers (without using third variable)