1) Java is a ___ programming language.
Everything in Java is implemented using Object-Oriented principles.
2) In Java programming language, the code is placed inside ___.
A) Classes, Interfaces
3) Properties are implemented using ___ in Java.
4) A Class in Java is like a ____.
5) Which is the file extension used for a public Java class source code?
6) Which is the file extension used for a compiled Java class file?
7) State TRUE or FALSE.
The source-code of An Abstract-Class or Interface is kept inside a .java file.
8) After compilation, an Interface or Abstract-Class is kept in a ___ file in Java programming.
All compiled Java classes, interfaces and abstract classes are kept in a .class file only. All source files are kept in .java files.
9) State TRUE or FALSE. In Java, a public class or abstract-class or interface must be kept in a separate .java file.
10) In a .java file, how many numbers of public types namely class, interface or abstract can be managed?
Only one public type is allowed per .java file.
11) In Java, the keyword used to declare a class is ___.
12) A Java class can contain___.
C) Inner Classes (A class inside another class)
13) How many maximum numbers of objects can be created from a single Class in Java?
There is no limit on the number of objects being created from a class.
14) Creating an object from a class is also called ____.
15) The keyword used to create a new object in Java is ___.
16) Choose the correct statements about choosing a name for a class in Java.
A) The class name can start with only a letter or underscore or dollar sign.
B) The class name can contain numbers
C) The class name can not start with a number
These are also called Java naming rules.
17) An object is created at __ time in Java.
18) Choose the correct statement about Java main method.
A) The main method is not a required method
B) The main method must be declared public static void.
C) you can define program flow using the main method. The Java virtual machine calls the main method directly.
Java compiler does not complain about a missing main method.
19) Choose the correct syntax for declaring a Java class below.
Use the keyword class but not Class.
20) Choose the correct way of creating an object of the below class.
Table t = new Table();
Table() t = new Table();