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 the result of the following code snippet?
Double bottles;
Double bottleVolume = bottles * 2;
System.out.println(bottleVolume);
(Multiple Choice)
5.0/5
(40)
Which is the Java equivalent of the following mathematical expression?
C = √(a2 + b2)
(Multiple Choice)
4.8/5
(45)
Which one of the following statements can be used to convert a string str to a double?
(Multiple Choice)
4.8/5
(26)
Which of the methods below are static methods?
I. length
II. substring
III. pow
IV. sqrt
(Multiple Choice)
4.8/5
(29)
What will be the value inside the variables x and y after the given set of assignments?
Int x = 20;
Int y = 10;
X = (x - y) * 2;
Y = x / 2;
(Multiple Choice)
4.8/5
(36)
What is the output of the following code snippet?
Public static void main(String[] args)
{
Int var1 = 10;
Int var2 = 2;
Int var3 = 20;
Var3 = var3 / (var1 % var2);
System.out.println(var3);
}
(Multiple Choice)
4.9/5
(45)
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)
5.0/5
(32)
What will be the value stored in the variable x after the execution of the following code snippet?
Int a = 10;
Int b = 20;
Int c = 2;
Int x = b / a /*c*/;
(Multiple Choice)
4.9/5
(36)
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.8/5
(26)
Which one of the following is a correct representation of the given mathematical expression in Java?
(Multiple Choice)
4.9/5
(30)
Which one of the following operators computes the remainder of an integer division?
(Multiple Choice)
4.8/5
(42)
What will be the value inside the variables a and b after the given set of assignments?
Int a = 20;
Int b = 10;
a = (a + b) / 2;
b = a;
a++;
(Multiple Choice)
4.7/5
(35)
What does the following statement sequence print?
String str = "Java Is Good";
Int n = str.length();
String mystery = str.substring(n - 4, n) +
Str)charAt(4) + str.substring(0, 4);
System.out.println(mystery);
(Multiple Choice)
4.8/5
(35)
Which of the following guidelines will make code more explanatory for others?
(Multiple Choice)
4.9/5
(30)
What output is produced by these statements?
String name = "Joanne Hunt";
System.out.println(name.length());
(Multiple Choice)
4.8/5
(37)
Which one of the following variables is assigned with valid literals?
(Multiple Choice)
4.8/5
(35)
What does the following statement sequence print if the user input is 123?
Public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter a number: ");
String str = in.next();
Str += 456;
System.out.println(str);
}
(Multiple Choice)
4.8/5
(40)
Which one of the following types of statements is an instruction to replace the existing value of a variable with another value?
(Multiple Choice)
4.8/5
(32)
Showing 61 - 80 of 103
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)