Test Series - java

Test Number 45/64

Q: Java is a ___ programming language.
A. Functional
B. Object-Oriented
C. Theoretical
D. All the above
Solution: Everything in Java is implemented using Object-Oriented principles.
Q: In Java programming language, the code is placed inside ___.
A. Classes, Interfaces
B. Methods
C. Blocks
D. All the above
Solution: no solution
Q: Properties are implemented using ___ in Java.
A. Methods
B. Variables
C. Interfaces
D. All the above
Solution: no solution
Q: A Class in Java is like a ____.
A.  Prototype
B. Instruction Sheet
C. Blueprint
D. All the above
Solution: no solution
Q: Which is the file extension used for a public Java class source code?
A.  .j
B.  .class
C. .java
D. None
Solution: no solution
Q: Which is the file extension used for a compiled Java class file?
A. .j
B. .java
C. .class
D. .cls
Solution: no solution
Q: State TRUE or FALSE.
The source-code of An Abstract-Class or Interface is kept inside a .java file.
A.  FALSE
B. TRUE
C. none
D. blank
Solution: no solution
Q: After compilation, an Interface or Abstract-Class is kept in a ___ file in Java programming.
A. .java
B. .cls
C. .class
D. .interface
Solution: All compiled Java classes, interfaces and abstract classes are kept in a .class file only. All source files are kept in .java files.
Q: State TRUE or FALSE. In Java, a public class or abstract-class or interface must be kept in a separate .java file.
A.  FALSE
B. TRUE
C. none
D. blank
Solution: no solution
Q: In a .java file, how many numbers of public types namely class, interface or abstract can be managed?
A. 1
B. 2
C. 3
D. Any number
Solution: Only one public type is allowed per .java file.

You Have Score    /10