A. Class cat extends animal
B. Class animal extends cat
C. Both a & b are correct
D. None is correct
View Answer
Object Oriented Programming MCQs
Which statement transfer execution to different parts of your code based on the value of an expression?
A. If
B. Switch
C. Nested-if
D. If-else-if
View Answer
Which of these have highest precedence?
A. ( )
B. ++
C. *
D. >>
View Answer
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
View Answer
Jvm stands for __________________.
A. Java virtual method
B. Java variable & methods
C. Java virtual machine
D. Java versatile machine
View Answer
The process of converting one date type to another is called__________.
A. Translating
B. Casting
C. Compiling
D. Declaring
View Answer
____________ is reserved keyword in java.
A. Abstract
B. Extends
C. Class
D. All of the above
View Answer
Java compiler translates source code into _____________.
A. Bytecode
B. Bitcode
C. Machine code
D. User code
View Answer
A variable declared inside the class but outside the body of the method is called _______.
A. Local variable
B. Global variable
C. Instance variable
D. Both a and c
View Answer
The process of specifying the variable name and its type is called variable _______.
A. Assignment
B. Declaration
C. Initialization
D. Specification
View Answer