Usharani has Published 93 Answers

Why the main method has to be in a java class?

usharani

usharani

Updated on 30-Jul-2019 22:30:20

Main method is the entry point of the execution in Java. When we execute a class JVM searches for the main method and execute the contents of it line by line. If you observe the following example you can compile a this program but if you try to execute it ... Read More

What is the difference between compile time polymorphism and runtime polymorphism in java?

usharani

usharani

Updated on 30-Jul-2019 22:30:20

If we perform (achieve) method overriding and method overloading using instance methods, it is run time (dynamic) polymorphism. In dynamic polymorphism the binding between the method call an the method body happens at the time of execution and, this binding is known as dynamic binding or late binding. Example ... Read More

Is null a keyword in Java?

usharani

usharani

Updated on 30-Jul-2019 22:30:20

No, null is not a keyword. Though they seem like keywords null, true and, false are considered as literals in Java.

Previous 1 ... 4 5 6 7 8 9 10
Advertisements