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
Which of the given statements generates the following output?
\\\"///
(Multiple Choice)
4.9/5
(35)
Assuming that the user inputs a value of 25 for the price and 10 for the discount rate in the following code snippet, what is the output?
Public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter the price: ");
Double price = in.nextDouble();
System.out.print("Enter the discount rate: ");
Double discount = in.nextDouble();
System.out.println("The new price is " +
Price - price * (discount / 100.0));
}
(Multiple Choice)
4.9/5
(37)
Consider the following division statements:
I. 22 / 7
II. 22.0 / 7
III. 22 / 7.0
Which of the following is correct?
(Multiple Choice)
4.9/5
(31)
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.9/5
(41)
Consider the following Java variable names:
I. 1stInstance
II. basicInt%
III. empName_
IV. addressLine1
V. DISCOUNT
Which of the following options is correct?
(Multiple Choice)
4.8/5
(35)
At what point in the problem-solving process should one write pseudocode?
(Multiple Choice)
4.7/5
(40)
Which one of the following statements gives the absolute value of the floating-point number x = -25.50?
(Multiple Choice)
4.8/5
(40)
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.8/5
(29)
What (if any) type of error occurs with the following code if the user input is ABC?
Public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter a number: ");
String str = in.next();
Int count = Integer.parseInt(str);
System.out.println("Input is " + count);
}
(Multiple Choice)
4.9/5
(42)
What is wrong with the following code snippet?
Int size = 42;
Cost = 9.99;
System.out.println("size = " + size);
System.out.println(" cost = " + cost);
(Multiple Choice)
4.9/5
(35)
Which of the following options is valid with reference to the code snippet?
Public static void main(String[] args)
{
Double d = 45.326;
Double r = d % 9.0;
System.out.println(r);
}
(Multiple Choice)
4.9/5
(49)
Which one of the following statements displays the output as (1.23e+02)?
(Multiple Choice)
4.8/5
(31)
Which of the given System.out.print statements generates the following output?
ABCDE"\
(Multiple Choice)
4.9/5
(34)
What is the output of the following code snippet?
Int counter = 0;
Counter++;
System.out.print("The initial value of the counter is ");
System.out.println(count);
(Multiple Choice)
4.9/5
(44)
What does the following statement sequence print?
Final String str = "Java";
Str += " is powerful";
System.out.println(str);
(Multiple Choice)
4.8/5
(32)
Which one of the following reserved words is used in Java to represent a value without a fractional part?
(Multiple Choice)
4.8/5
(36)
Showing 81 - 100 of 103
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)