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
If you need to import not only the top-level of a package, but all its secondary levels as well, you should write: import package.*.*;
(True/False)
4.7/5
(47)
The printf method within System.out is designed to ease the conversion of legacy C code into Java.
(True/False)
4.8/5
(41)
Write the code to define the JFrame which will have the components placed into the JPanel first where the JPanel will have the inputLabel and ageField side by side and the outputLabel and messageLabel beneath them. Do not worry about making the JFrame do anything (i.e., don't implement an ActionListener).
(Essay)
5.0/5
(34)
Write a statement using a Scanner method to get the first name interactively.
(Short Answer)
4.8/5
(45)
Consider the following enumeration enum Speed { FAST, MEDIUM, SLOW };
(Multiple Choice)
4.7/5
(32)
The advantages of the DecimalFormat class compared with the NumberFormat class include
(Multiple Choice)
4.8/5
(33)
Only difficult programming problems require a pseudocode solution before the programmer creates the implementation (program) itself.
(True/False)
4.8/5
(33)
These two ways of setting up a string yield identical results:
a) String string = new String("string");
b) String string = "string";
(True/False)
4.9/5
(38)
Consider the condition (x == y). How is this handled if x and y are primitive types?
How is this handled if x and y are objects?
(Essay)
4.9/5
(43)
You may apply the prefix and postfix increment and decrement operators to instances of the Integer class.
(True/False)
4.7/5
(29)
The names of the wrapper classes are just the names of the primitive data types, but with an initial capital letter.
(True/False)
4.9/5
(40)
In addition to their usage providing a mechanism to convert (to box) primitive data into objects, what else do the wrapper classes provide?
(Multiple Choice)
4.9/5
(39)
Given the following code fragment String strA = "aBcDeFg";
String strB = strA.toLowerCase( );
StrB = strB.toUpperCase( );
String strC = strA.toUpperCase( );
(Multiple Choice)
4.9/5
(33)
These two ways of setting up a String yield identical results:
a) String string = new String(12345);
b) String string = new String("12345");
(True/False)
4.8/5
(39)
These two ways of setting up a String yield identical results:
a) String string = "12345"
b) String string = 12345;
(True/False)
4.9/5
(50)
Showing 41 - 58 of 58
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)