Exam 2: Fundamental Data Types
Exam 1: Introduction96 Questions
Exam 2: Fundamental Data Types103 Questions
Exam 3: Decisionseasy99 Questions
Exam 4: Loops100 Questions
Exam 5: Methods94 Questions
Exam 6: Arrays and Arraylists100 Questions
Exam 7: Inputoutput and Exception Handling100 Questions
Exam 8: Objects and Classes101 Questions
Exam 9: Inheritance and Interfaces99 Questions
Exam 10: Graphical User Interfaces54 Questions
Exam 11: Advanced User Interfaces91 Questions
Exam 12: Object-Oriented Design100 Questions
Exam 13: Recursion100 Questions
Exam 14: Sorting and Searching99 Questions
Exam 15: The Java Collections Framework100 Questions
Exam 16: Basic Data Structures94 Questions
Exam 17: Tree Structures100 Questions
Exam 18: Generic Classes78 Questions
Exam 19: Streams and Binary Inputoutput82 Questions
Exam 20: Multithreading82 Questions
Exam 21: Internet Networking74 Questions
Exam 22: Relational Databases75 Questions
Exam 23: XML74 Questions
Exam 24: Web Applications74 Questions
Select questions type
What is wrong with the following code snippet?
Int average;
Average = 78A;
(Multiple Choice)
5.0/5
(40)
Which one of the following statements defines a constant with the value 123?
(Multiple Choice)
4.8/5
(41)
What is the output of the following code snippet?
System.out.printf("%5.3f", 20.0);
(Multiple Choice)
4.8/5
(35)
Which of the following statements about constants in Java are true?
I. Although not required, constants are commonly named using uppercase letters
II. Only integer values can appear as constants
III. A variable can be defined with an initial value, but the reserved word final prevents it from being changed
IV. A named constant makes computations that use it clearer
(Multiple Choice)
4.7/5
(33)
Which is the Java equivalent of the following mathematical expression?
C = (√a + √b)2
(Multiple Choice)
4.9/5
(29)
Which of the following is the Java equivalent of the following mathematical expression?
C = 2 . radius
(Multiple Choice)
4.8/5
(31)
Which one of the following refers to a number constant that appears in code without explanation?
(Multiple Choice)
4.9/5
(31)
What is wrong with the following code snippet?
Int price;
Price = 9.42;
(Multiple Choice)
4.7/5
(39)
What is the output of the following code snippet?
Public static void main(String[] args)
{
Double x;
X = Math.pow(3.0, 2.0) + Math.pow(4.0, 2.0);
System.out.println(x);
}
(Multiple Choice)
4.9/5
(40)
Which of the following is the mathematical equivalent of the following Java expression?
H = (4.0 * a * b - Math.pow(b, 2)) / c;
(Multiple Choice)
4.8/5
(35)
What is wrong with the following code?
Int count = 2000 * 3000 * 4000;
(Multiple Choice)
4.7/5
(38)
What is the value inside the var variable at the end of the given code snippet?
Public static void main(String[] args)
{
Int var = 30;
Var = var + 2 / var;
Var++;
}
(Multiple Choice)
4.8/5
(40)
What is the output of the following code snippet?
Public static void main(String[] args)
{
Int value = 25;
Value = value * 2;
Value--;
System.out.println(value);
}
(Multiple Choice)
4.8/5
(39)
What does the following statement sequence print?
String str = "Java";
Str += " is powerful";
System.out.println(str);
(Multiple Choice)
4.8/5
(41)
In an airline reservation system, the number of available seats in an airplane is required. Which data type should be used to store this value?
(Multiple Choice)
5.0/5
(38)
Showing 21 - 40 of 103
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)