Exam 4: Fundamental Data Types
Exam 1: Introduction98 Questions
Exam 2: Using Objects76 Questions
Exam 3: Implementing Classes103 Questions
Exam 4: Fundamental Data Types125 Questions
Exam 5: Decisions120 Questions
Exam 6: Loops128 Questions
Exam 7: Arrays and Array Lists118 Questions
Exam 8: Designing Classes95 Questions
Exam 9: Inheritance101 Questions
Exam 10: Interfaces85 Questions
Exam 11: Inputoutput and Exception Handling109 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion110 Questions
Exam 14: Sorting and Searching109 Questions
Exam 15: The Java Collections Framework110 Questions
Exam 16: Basic Data Structures104 Questions
Exam 17: Tree Structures110 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Graphical User Interfaces76 Questions
Exam 20: Streams and Binary Inputoutput82 Questions
Exam 21: Multithreading82 Questions
Exam 22: Internet Networking74 Questions
Exam 23: Relational Databases75 Questions
Exam 24: XML74 Questions
Exam 25: Web Applications75 Questions
Select questions type
Which one of the following statements can be used to extract the last 10 characters from the string variable str?
(Multiple Choice)
4.8/5
(38)
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
(34)
Which of the following options defines an integer variable?
(Multiple Choice)
5.0/5
(43)
Assuming that the user inputs "Joe" at the prompt, what is the output of the following code snippet? public static void main(String[] args)
{
System.out.print("Enter your name ");
String name;
Scanner in = new Scanner(System.in);
Name = in.next();
Name += ", Good morning";
System.out.print(name);
}
(Multiple Choice)
4.9/5
(42)
Which one of the following statements displays the output as (1.23e+02)?
(Multiple Choice)
4.9/5
(39)
What is the output of the following code snippet? System.out.printf("%5.3f", 20.0);
(Multiple Choice)
4.9/5
(50)
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
(37)
Assuming that the user enters 23 and 45 as inputs for num1 and num2, respectively, what is the output of the following code snippet? public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter a number: ");
String num1 = in.next();
System.out.print("Enter another number: ");
String num2 = in.next();
System.out.println(num1 + num2);
}
(Multiple Choice)
4.8/5
(31)
What is the result of the following expression? double d = 2.5 + 4 * -1.5 - (2.5 + 4) * -1.5;
(Multiple Choice)
4.8/5
(42)
What is the difference between the result of the following two Java statements?
I. int cents = (int)(100 * price + 0.5);
II. int cents = (100 * price + 0.5);
(Multiple Choice)
4.7/5
(28)
What are the values of num1 and num2 after this snippet executes? double num1 = 4.20;
Double num2 = num1 * 10 + 5.0;
(Multiple Choice)
4.9/5
(38)
Given the definition final double PI = 3.14159; which of the following is the Java equivalent of the mathematical expression c = radius2
(Multiple Choice)
4.7/5
(43)
What is the output of this code snippet? double average;
Int grade1 = 87;
Int grade2 = 94;
// System.out.print("The average is " + (grade1 + grade2) / 2.0);
System.out.print("The average is " + average);
(Multiple Choice)
4.8/5
(36)
Which one of the following statements displays the output as +000321.00?
(Multiple Choice)
4.8/5
(42)
Which of the following statements places input into the variable value given this line of code? Scanner in = new Scanner(System.in);
(Multiple Choice)
4.9/5
(41)
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
(35)
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.9/5
(34)
Showing 81 - 100 of 125
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)