Set - 10

Question 31 :

Can a .java file contain more than one java classes?

Answer :

Yes, a .java file contain more than one java classes, provided at the most one of them is a public class.


Question 32 :

Is String a primitive data type in Java?

Answer :

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.


Question 33 :

Is main a keyword in Java?

Answer :

No, main is not a keyword in Java.


Question 34 :

Is next a keyword in Java?

Answer :

No, next is not a keyword.


Question 35 :

Is delete a keyword in Java?

Answer :

No, delete is not a keyword in Java. Java does not make use of explicit destructors the way C++ does.