What will be the initial value of an object reference which is defined as an instance variable?
The object references are all initialized to null in Java. However in order to do anything useful with these references, you must set them to a valid object, else you will get NullPointerExceptions everywhere you try to use such default initialized references.
Are main, next delete, exit keywords in Java?
No, they are not keywords in Java.
delete is not a keyword in Java. Java does not make use of explicit destructors the way C++ does.
To exit a program explicitly you use exit method in System object.
Is String a primitive data type in Java?
No String is not a primitive data type in Java, even though it is one of the most extensively used object. Strings in Java are instances of String class defined in java.lang package.
Is Empty.java file a valid source file?
Yes, an empty .java file is a perfectly valid source file.
What does it mean that a method or field is “static”?
Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class.
Static methods can be referenced with the name of the class rather than the name of a particular object of the class (though that works too). That’s how library methods like System.out.println() work out is a static field in the java.lang.System class