Page 1
Java - Terms Latest Questions and
Correct Answers
many forms
Ans: Polymorphism
key word used to define class variables and class methods
Ans: static
bunch of classes
Ans: Package
*, /, %, +, -
Ans: Arithmetic operators
<, >, <=, >=, instanceof
Ans: Relational operators
&&, ||
Ans: Logical operators
-expression, +expression, ++expression, !, etc.
, Page 2
Ans: Unary operators
Add JOptionPane class
Ans: import javax.swing.JOptionPane
A void method returns?
Ans: nothing
Declare a new variable - rand - in the random class
Ans: Random rand = new Random();
What does rand.nextInt(10); return? Where rand is an object
of the Random Class.
Ans: random integer between 0 and < 10
import statement for using the Random class?
Ans: import java.util.Random;
Methods have these two elements?
Ans: header and body
decision statements like (if - else) and loops can be called?
Java - Terms Latest Questions and
Correct Answers
many forms
Ans: Polymorphism
key word used to define class variables and class methods
Ans: static
bunch of classes
Ans: Package
*, /, %, +, -
Ans: Arithmetic operators
<, >, <=, >=, instanceof
Ans: Relational operators
&&, ||
Ans: Logical operators
-expression, +expression, ++expression, !, etc.
, Page 2
Ans: Unary operators
Add JOptionPane class
Ans: import javax.swing.JOptionPane
A void method returns?
Ans: nothing
Declare a new variable - rand - in the random class
Ans: Random rand = new Random();
What does rand.nextInt(10); return? Where rand is an object
of the Random Class.
Ans: random integer between 0 and < 10
import statement for using the Random class?
Ans: import java.util.Random;
Methods have these two elements?
Ans: header and body
decision statements like (if - else) and loops can be called?