What do you mean by platform independency. Is java a platform independent language, What is JVM. Is JVM platform independent ?
What is Polymorphism in Java ? Polymorphism means many forms, in java it is possible to have many forms of a single method on the basis of difference in between their parameters.
Here are top selected core java interview questions asked in high level interviews, these questions may be helpful for both freshers or experienced professional going for interview.
How to prevent a method from being overridden in Java? To prevent a method from being overridden in java we have declare the method as final, if a method is declared as final that a subclass cannot override it.
Can a class extend more than one class in Java? No, java does not support multiple inheritance. In java a class cannot extends more than one class but it can implement as many interfaces as it wants.
What is a List interface in Java? What are its implementation classes? List interface is a part of Java Collections API, List interface extends Collection interface provides support for ordered collections of Objects.
What if we does not pass an String array of objects to main() method ? Program will compile fine, but at runtime it will give an error ?NoSuchMethodError?.
What are immutable objects in Java? In java, immutable objects are the objects which can not be changed once created. Any change to the states of these object results in a new object.
What if, we import a class or package more than once in our program? We can import a class or an package as many times as we want to, neither the compiler or the JVM will complain about it.
What is synchronization in Java? In java synchronization is the ability to control the access of multiple threads to shared resources. Synchronization ensures that only one thread can access a shared resource at a time.
3 ways of loop or iterate through a Map implementation HashMap or TreeMap in Java, In this particular blog we will see how to loop a Map or how to iterate over a Map in Java.