A native method is a method that is implemented in a language other than Java.
System is a predefined final class, out is a PrintStream object and println is a built-in overloaded method in the out object.
The valueOf() function of Integer class is is used to convert string to Number. Here is the code example: String numString = “1000″; int id=Integer.valueOf(numString).intValue();
Global variables are globally accessible. Java does not support globally accessible variables due to following reasons: The global variables breaks the referential transparency Global variables create collisions in namespace.
The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.
final – declare constant finally – handles exception finalize – helps in garbage collection Variables defined in an interface are implicitly final. A final class can’t be extended i.e., final… read more →
Program compiles. But at runtime throws an error “NoSuchMethodError”.
The == operator compares two objects to determine if they are the same object in memory i.e. present in the same memory location. It is possible for two String objects… read more →
public – main(..) is the first method called by java environment when a program is executed so it has to accessible from java environment. Hence the access specifier has to… read more →