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
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)
5.0/5
(38)
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.9/5
(36)
Which of the following guidelines will make code more explanatory for others?
(Multiple Choice)
4.8/5
(50)
What does the following statement sequence print? String str = "Java";
Str += " is powerful";
System.out.println(str);
(Multiple Choice)
4.8/5
(38)
What is the correct way to invoke methods on variables in Java that are strings?
(Multiple Choice)
4.8/5
(39)
What is the result of the following code snippet? double bottles;
Double bottleVolume = bottles * 2;
System.out.println(bottleVolume);
(Multiple Choice)
4.9/5
(38)
What is the output of the following code snippet? String firstname = "William";
String lastname;
System.out.println("First: " + first);
System.out.println("Last: " + lastname);
(Multiple Choice)
4.7/5
(29)
What is result of evaluating the following expression? (45 / 6) % 5
(Multiple Choice)
4.7/5
(36)
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 ");
Int myInt = in.nextInt();
MyInt += 456;
System.out.println(myInt);
}
(Multiple Choice)
4.8/5
(31)
What is the value of the following expression? 2 + 3 + 5 / 2
(Multiple Choice)
4.9/5
(31)
What is wrong with the following code?
Int count = 2000 * 3000 * 4000;
(Multiple Choice)
4.9/5
(42)
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.9/5
(37)
Assuming that the user inputs a value of 30 for the price and 10 for the discount rate in the following code snippet, what is the output? 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.print("The new price is ");
System.out.println(price - price * (discount / 100.0));
(Multiple Choice)
4.9/5
(35)
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.7/5
(38)
What will be printed by the statements below? final int BONUS = 20;
Int salary = 100;
Int netSalary = salary + BONUS;
System.out.print (netSalary);
(Multiple Choice)
4.9/5
(39)
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
(40)
Assume the following variable has been declared and given values as shown: String name = "Mamey, Jean";
Which statement will print the name as "Jean Mamey"?
(Multiple Choice)
4.9/5
(42)
Showing 21 - 40 of 125
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)