Questions and CORRECT Answers
many forms - CORRECT ANSWER - Polymorphism
key word used to define class variables and class methods - CORRECT ANSWER - static
bunch of classes - CORRECT ANSWER - Package
*, /, %, +, - - CORRECT ANSWER - Arithmetic operators
<, >, <=, >=, instanceof - CORRECT ANSWER - Relational operators
&&, || - CORRECT ANSWER - Logical operators
-expression, +expression, ++expression, !, etc. - CORRECT ANSWER - Unary operators
Add JOptionPane class - CORRECT ANSWER - import javax.swing.JOptionPane
A void method returns? - CORRECT ANSWER - nothing
Declare a new variable - rand - in the random class - CORRECT ANSWER - Random rand
= new Random();
What does rand.nextInt(10); return? Where rand is an object of the Random Class. - CORRECT
ANSWER - random integer between 0 and < 10
, import statement for using the Random class? - CORRECT ANSWER - import
java.util.Random;
Methods have these two elements? - CORRECT ANSWER - header and body
decision statements like (if - else) and loops can be called? - CORRECT ANSWER -
control structures
JavaDoc produces what type of documentation? - CORRECT ANSWER - HTML
The method header definition contains arguments or parameters? - CORRECT ANSWER -
parameters
In the method call statement that uses variables, they are called? - CORRECT ANSWER -
arguments
Process of breaking down a problem into smaller pieces? - CORRECT ANSWER -
functional decomposition
When using System.out.printf or System.out.format should you use \n or %n for a new line
character? - CORRECT ANSWER - %n
import statement goes before or after Javadoc comment? - CORRECT ANSWER - before
References and Acknowledgements from CS 139 go before or after the import statement? -
CORRECT ANSWER - before
Environment variable for java binaries like javac? - CORRECT ANSWER - Path