Exam 2: Java Fundamentals
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
Assuming that pay has been declared a double,the following statement is valid.
pay = 2,583.44;
(True/False)
4.8/5
(37)
What will be the value of z after the following statements have been executed? int x = 4,y = 33;
Double z;
Z = (double)(y / x);
(Multiple Choice)
5.0/5
(31)
What will be displayed as a result of executing the following code? public class test
{
Public static void main(String[] args)
{
Int value1 = 9;
System.out.println(value1);
Int value2 = 45;
System.out.println(value2);
System.out.println(value3);
Value = 16;
}
}
(Multiple Choice)
4.9/5
(42)
In the following Java statement what value is stored in the variable name? String name = "John Doe";
(Multiple Choice)
4.9/5
(42)
Which of the following is not a rule that must be followed when naming identifiers?
(Multiple Choice)
4.8/5
(33)
If the compiler encounters a statement that uses a variable before the variable is declared,an error will result.
(True/False)
4.9/5
(31)
Character literals are enclosed in _____;string literals are enclosed in _____.
(Multiple Choice)
4.8/5
(42)
What is the result of the following expression? 17 % 3 * 2 - 12 + 15
(Multiple Choice)
4.8/5
(35)
What would be displayed as a result of the following code? int x = 578;
System.out.print("There are " +
X + 5 + " \ n" +
"hens in the hen house.");
(Multiple Choice)
4.8/5
(34)
What will be displayed as a result of executing the following code? int x = 8;
String msg = "I am enjoying java.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
Ltr);
System.out.println("msg has " + strSize +
" characters.");
(Multiple Choice)
4.8/5
(34)
If the following Java statements are executed,what will be displayed? System.out.println("The top three winners are \ n");
System.out.print("Jody,the Giant \ n");
System.out.print("Buffy,the Barbarian");
System.out.println("Adelle,the Alligator");
(Multiple Choice)
4.7/5
(46)
If x has been declared an int,which of the following statements is invalid?
(Multiple Choice)
4.8/5
(49)
When saving a Java source file,save it with an extension of
(Multiple Choice)
4.8/5
(36)
What will be the value of z as a result of executing the following code? int x = 5,y = 28;
Float z;
Z = (float)(y / x);
(Multiple Choice)
4.7/5
(40)
To print "Hello,world" on the monitor,use the following Java statement
(Multiple Choice)
4.9/5
(31)
Both character literals and string literals can be assigned to a char variable.
(True/False)
4.8/5
(43)
What is the result of the following expression? 25 / 4 + 4 * 10 % 3
(Multiple Choice)
4.8/5
(37)
Showing 21 - 40 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)