final jeopardy fundamen tal java numerical data type boolean expressi on if/then/ while miscellan...
TRANSCRIPT
Final JeopardyFinal JeopardyFundamFundam
ental ental JavaJava
NumericaNumericall
Data typeData type
Boolean Boolean
ExpressExpressionion
If/If/THEN/THEN/WHILEWHILE
MiscellaMiscellaneousneous
1010 1010 1010 1010 1010
2020 2020 2020 2020 2020
3030 3030 3030 3030 3030
4040 4040 4040 4040 4040
5050 5050 5050 5050 5050
Java fundamental for 10Java fundamental for 10
Q: How to compile and run a Java Q: How to compile and run a Java program?program?
OL 10 A
Java fundamental– 10 pointsJava fundamental– 10 points
A: What is Javac and Java?A: What is Javac and Java?
Table
Java fundamental for 20Java fundamental for 20
Q: A Java program contains one or Q: A Java program contains one or more of this?more of this?
OL 20 A
Java fundamental for 20Java fundamental for 20
A: What is CLASS?A: What is CLASS?
Table
Java fundamental for 30Java fundamental for 30
Q: This is needed to run the same Java program Q: This is needed to run the same Java program on different Operating Systems without having on different Operating Systems without having to recompile?to recompile?
OL 30 A
Java Fundamental for 30Java Fundamental for 30
A: What is Java Virtual Machine (JVM) ?A: What is Java Virtual Machine (JVM) ?
Table
Java fundamental for 40Java fundamental for 40
Q: The name of this tree has been Q: The name of this tree has been used as another name for Java ?used as another name for Java ?
OL 40 A
Java fundamental for 40Java fundamental for 40
A: What is “OAK”?A: What is “OAK”?
Table
Java fundamental for 50Java fundamental for 50
Q: This used to be the best selling point for Java Q: This used to be the best selling point for Java (hint: refer to its portability with 4 words) (hint: refer to its portability with 4 words)
OL 50 A
Java fundamental for 50Java fundamental for 50
A: What is “Write ONCE Run A: What is “Write ONCE Run EVERYWHERE”?EVERYWHERE”?
Table
Numerical Data type 10Numerical Data type 10
Q: Data types used to represent Q: Data types used to represent integer values?integer values?
CF 10 A
Numerical Data for 10Numerical Data for 10
A: What are byte, short, int, long?A: What are byte, short, int, long?
Table
Numerical Data for 20Numerical Data for 20
Q: Data types to represent real Q: Data types to represent real values.values.
CF 20 A
Numerical data types for 20Numerical data types for 20
A: What are float and double?A: What are float and double?
Table
Numerical data type for 30Numerical data type for 30
Q: These symbols are allowed in a Q: These symbols are allowed in a valid identifier?valid identifier?
CR 30 A
Numerical data type for 30Numerical data type for 30
A: What are $ and _?A: What are $ and _?
Table
Numerical Data type for 40Numerical Data type for 40
Q: Suppose we have:Q: Suppose we have:int x, y;int x, y;x = 40;x = 40;y = x / 6y = x / 6
What is the value of y?What is the value of y?
CF 40 A
Numerical Data for 40Numerical Data for 40
A: What is 6?A: What is 6?
Table
Numerical data for 50Numerical data for 50
Q: The values of this can not be Q: The values of this can not be changed in the entire program?changed in the entire program?
CF 50 A
Numerical data for 50Numerical data for 50
A: What is constant?A: What is constant?
Table
Boolean expression for 10Boolean expression for 10
Q: Boolean expressions are evaluated Q: Boolean expressions are evaluated to one of these values?to one of these values?
IS 10 A
Boolean expression for 10Boolean expression for 10
A: What is true or false?A: What is true or false?
Table
Boolean expression for 20Boolean expression for 20
Q: These are boolean operators in Q: These are boolean operators in Java?Java?
IS 20 A
Boolean Expression for 20Boolean Expression for 20
A: What are AND, OR, NOT?A: What are AND, OR, NOT?
Table
Boolean expression for 30Boolean expression for 30
Q: Which are the six relational operators Q: Which are the six relational operators used in boolean expressions?used in boolean expressions?
A.A. <<B.B. >=>=C.C. <=<=D.D. >>E.E. ====F.F. &&&&G.G. !=!=H.H. ! !
IS 30A
Boolean expression for 30Boolean expression for 30
A: What are A,B,C,D,E,and G?A: What are A,B,C,D,E,and G?
Table
Boolean Expression for 40Boolean Expression for 40
Q: Evaluate this boolean expression:Q: Evaluate this boolean expression:
(1<2 || 4 <=3)(1<2 || 4 <=3)
IF 40 A
Boolean expression for 40Boolean expression for 40
A: What is true?A: What is true?
Table
Boolean expression for 50Boolean expression for 50
Q:Q: Evaluate this expression:Evaluate this expression:
(60%3 == 0) && (50%9 != 0)(60%3 == 0) && (50%9 != 0)
IF 50 A
Boolean expression for 50Boolean expression for 50
A: What is true?A: What is true?
Table
If/then/while/for for 10If/then/while/for for 10
Q: What is the output from the following code?.Q: What is the output from the following code?.int number = 45;int number = 45;if (number != 45) {if (number != 45) {
System.out.println(“Hello”);System.out.println(“Hello”);}}else {else {
System.out.println(“Bye”);System.out.println(“Bye”);}}
A. HelloA. Hello
B. ByeB. ByeT10 A
If/Then/While for 10If/Then/While for 10
A: What is B?A: What is B?
Table
If/Then/While for 20If/Then/While for 20
Q: What is the result of this switch statement: Q: What is the result of this switch statement: int number = 45;int number = 45;switch (number) {switch (number) {case 35: System.out.println(“Good”);case 35: System.out.println(“Good”);case 45: System.out.println(“Fair”);case 45: System.out.println(“Fair”);case 55: System.out.println(“None”);case 55: System.out.println(“None”);
}}A. GoodA. GoodB. FairB. FairC. NoneC. None
T20 A
If/Then/While for 20If/Then/While for 20
A: What is Fair?A: What is Fair?
Table
If/Then/While for 30If/Then/While for 30
Q: What is this code doing?Q: What is this code doing?
if (num1 * num2 * num3 < 0) {if (num1 * num2 * num3 < 0) {
System.out.println(“This is good”);System.out.println(“This is good”);
}}
else {else {
System.out.println(“This is bad”);System.out.println(“This is bad”);
}}T30 A
If/Then/While for 30If/Then/While for 30A: What is “if products of these three A: What is “if products of these three
numbers (num1,num2,num3) are numbers (num1,num2,num3) are negative, print out “This is good”. negative, print out “This is good”. Otherwise, print out “This is bad” ?Otherwise, print out “This is bad” ?
Table
If/Then/While for 40If/Then/While for 40
Q: These symbols are always found in Q: These symbols are always found in an if statementan if statement
T40 A
If/Then/While for 40If/Then/While for 40
A: What are ( and )?A: What are ( and )?
Table
T50 A
It/Then/While for 50It/Then/While for 50
Q: The statements in the body of this Q: The statements in the body of this loop must be executed at least ONCEloop must be executed at least ONCE
If/Then/While for 50If/Then/While for 50
A: What is DO-WHILE loop?A: What is DO-WHILE loop?
Table
Miscellaneous for 10Miscellaneous for 10
Q: Switch only support these data Q: Switch only support these data types ?. types ?.
DM 10 A
Miscellaneous for 10Miscellaneous for 10
A: What are char and integer (byte, A: What are char and integer (byte, short, int)?short, int)?
Table
Miscellaneous for 20Miscellaneous for 20
Q: Operand is converted from a lower Q: Operand is converted from a lower to a higher precisionto a higher precision
DM 20 A
Miscellaneous for 20Miscellaneous for 20
A: What is implicit casting? A: What is implicit casting?
Table
Miscellaneous for 30Miscellaneous for 30
Q: How can we say 2Q: How can we say 233 in Java. in Java.
DM 30 A
Miscellaneous for 30Miscellaneous for 30
A: What is Math.pow(2,3) ?A: What is Math.pow(2,3) ?
Table
Miscellaneous for 40Miscellaneous for 40
Q: JOptionPane.showInputDialog gets Q: JOptionPane.showInputDialog gets input from a user and return this data input from a user and return this data typetype
DM 40 A
Miscellaneous for 40Miscellaneous for 40
A: What is String?A: What is String?
Table
Miscellaneous for 50Miscellaneous for 50
Q: The value of this component can be Q: The value of this component can be changed in a Java program changed in a Java program
DM 50 A
Miscellaneous for 50Miscellaneous for 50
A: What is variable?A: What is variable?
Table