JAVA
MCQ TEST : 1
@MrProgrammer89 - Follow
Q1) which of the following is not a language?
A. BASIC
B. COBOL
C. Unix
D. Pascal
ANS :- C
Q2) Which translates the program line by line?
A. compiler
B. interpreter
C. All of above
D. None of above
ANS :- B
Q3) Which of the following are example for System software?
A. DOS
B. Windows
C. MS Word
D. Linux
ANS :- A,B,D
Q4) Java Source Code is compiled into ______________.
A. Obj code
B. Bytecode
C. Exe
D. None of above
ANS :- B
Q5) Which of the tool is used to compile java code?
A. java
B. javac
C. jar
D. javadoc
ANS :- B
Q6) What is the extension of java code files?
A. .class
B. .java
C. .txt
D. .js
ANS :- B
Q7) Which component is responsible to run java program?
A. JVM
B. JDK
C. JIT
D. JRE
ANS :- JRE
@MrProgrammer89
Q8) Which component is used to compile, debug and execute java program?
A. JVM
B. JDK
C. JIT
D. JRE
ANS :- B
Q9) What is byte code in Java?
A. Code generated by a Java compiler
B. Code generated by a Java Virtual Machine
C. Name of Java source code file
D. Block of code written inside a class
ANS :- A
Q10) Which of the fallowing keyword must be used to inherit a class?
A. SUPER
B. THIS
C. EXTENDS
D. ECTENT
ANS :- C
Q11) Which of the fallowing inheritance not supported in java?
A. Single inheritance
B. Multiple inheritance using classes
C. Multiple inheritance using interfaces
D. Multilevel inheritance
ANS :- B
Q12) What is subclass in java?
A. A subclass is a class that extends another class
B. A subclass is a class declared inside a class
C. Both
D. None of the above
ANS :- A
Q13) which of fallowing is/are supports Final keyword in java
A. Class
B. class fields
C. class methods
D. All of the above
ANS :- D
Q14) False statement about final method in java?
A. Value of final variable cannot be changed once initialized
B. Final method is inherited but we cannot override it
C. If you make a class final then you cannot extend the class
D. Constructor can be declared as final.
ANS :- D
Q15) Super keyword in java is used to
A. Refer immediate parent class instance variables.
B. Invoke immediate parent class methods
C. Invoke immediate parent class constructor.
D. ALL
ANS :- D
@MrProgrammer89