Exam 3: Using Classes and Objects
Exam 1: Introduction65 Questions
Exam 2: Data and Expressions77 Questions
Exam 3: Using Classes and Objects58 Questions
Exam 4: Writing Classes56 Questions
Exam 5: Conditionals and Loops37 Questions
Exam 6: More Conditionals and Loops36 Questions
Exam 7: Object-Oriented Design76 Questions
Exam 8: Arrays70 Questions
Exam 9: Inheritance71 Questions
Exam 10: Polymorphism70 Questions
Exam 11: Exceptions68 Questions
Exam 12: Recursion68 Questions
Exam 13: Collections68 Questions
Select questions type
Rewrite the following five assignment statements into a single statement using prefix and postfix increment and decrement operators as necessary. Assume all variables are int variables.
x = y + 1;
y = y + 1;
z = z - 1;
x = x - z;
x = x + 1;
(Short Answer)
4.8/5
(36)
For the program to get a name interactively a Scanner object must be instantiated. Write the Java statement to do this.
(Essay)
4.9/5
(42)
What happens if you attempt to use a variable before it has been initialized?
(Multiple Choice)
4.8/5
(33)
These two ways of setting up a String yield identical results:
a) String string = new String("123.45");
b) String string = "" + 123.45;
(True/False)
4.9/5
(40)
Which of the following GUI components is used to accept input into a JFrame?
(Multiple Choice)
4.8/5
(38)
The advantage(s) of the Random class' pseudo-random number generators, compared to the Math.random method, is that
(Multiple Choice)
4.9/5
(30)
Write a statement using a method to guarantee that the initial will be a capital letter.
(Essay)
4.8/5
(32)
In Java, the symbol "=" and the symbol "==" are used synonymously (interchangeably).
(True/False)
4.8/5
(38)
Say you write a program that makes use of the Random class, but you fail to include an import statement for java.util.Random (or java.util.*). What will happen when you attempt to compile and run your program.
(Multiple Choice)
4.9/5
(39)
What is the difference between a heavyweight and a lightweight container?
(Essay)
4.8/5
(44)
Showing 21 - 40 of 58
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)