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
Consider the following two lines of code. What can you say about s1 and s2?
String s1 = "testing" + "123";
String s2 = new String("testing 123");
Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
C
What is the advantage of putting an image in a JLabel instance?
Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
A
Java.text's NumberFormat class includes methods that
Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
E
Which of the following will yield a pseudorandom number in the range [ -5, +5 ) given the following: Random gen = new Random( );
(Multiple Choice)
4.9/5
(39)
You may use the String replace( ) method to remove characters from a String.
(True/False)
5.0/5
(34)
In the StringMutation program shown in Listing 3.1, if phrase is initialized to "Einstein" what will Mutation #3 yield if Mutation #1: mutation1 = phrase.concat(".")?
(Multiple Choice)
4.7/5
(36)
The Random class' setSeed( ) method allows you to restart the pseudo-random number sequence.
(True/False)
4.9/5
(47)
Given two String variables, s1 and s2, is it possible for (s1 != s2) to be True while (s1.equals(s2)) is also True?
Why or why not?
(Essay)
4.9/5
(36)
What will be displayed by this command: System.out.println(Math.pow(3, 3-1));
(Multiple Choice)
4.8/5
(36)
A JPanel can be added to a JFrame to form a GUI. In order to place other GUI components such as JLabels and Buttons into the JFrame, which of the following messages is passed to the JPanel?
(Multiple Choice)
4.8/5
(28)
When comparing any primitive type of variable, == should always be used to test to see if two values are equal.
(True/False)
5.0/5
(30)
Showing 1 - 20 of 58
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)