Exam 2: Using Objects
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
Which of the following statements about test programs is true?
(Multiple Choice)
4.7/5
(36)
In the code below, write a statement that sets the graphic to green. public class ItalianFlagComponent extends JComponent
{
Public void paintComponent(GraphicsG) {
Graphics2D g2 = (Graphics2D) g;
Rectangle.Double leftRectangle = new Rectangle.Double(100, 100, 30, 60);
) . .
____
) . .
}
}
(Multiple Choice)
4.8/5
(38)
Which of the following terms denotes the memory location of an object?
(Multiple Choice)
4.8/5
(33)
What is the output of the following code:
Int num1 = 6;
Int num2 = num1;
Num2 = num2 + 10;
System.out.println(num1);
(Multiple Choice)
4.9/5
(33)
The object on which the method call is invoked provides input to the method, and is called a(n) _________________.
(Multiple Choice)
4.9/5
(35)
Which of the following represents a method call to a method with a void return type?
(Multiple Choice)
4.8/5
(32)
Which of the following statements about objects is correct?
(Multiple Choice)
4.8/5
(48)
Assume that the variable count has been declared as type int. Which statement adds 10 to count?
(Multiple Choice)
4.8/5
(45)
Which of the following declares a variable that will store a measurement with fractional parts?
(Multiple Choice)
4.9/5
(46)
Which method call represents the invocation of a method that does not have explicit parameters?
(Multiple Choice)
4.7/5
(42)
If greeting refers to a String object, which of the following is a syntactically correct Java statement?
(Multiple Choice)
5.0/5
(45)
Assuming the following Java statement: Circle c1 = new Circle(3);
What does the variable c1 store?
(Multiple Choice)
4.8/5
(34)
A method name is ____________________ if a class has more than one method with that name (but different parameter types).
(Multiple Choice)
4.9/5
(31)
What is a storage location in the computer's memory called that has a type, name, and contents?
(Multiple Choice)
4.8/5
(40)
Assume that the variable count has been declared as type int, which statement changes the value of count?
(Multiple Choice)
4.9/5
(37)
Which term is used to describe the name of a variable, method, or class?
(Multiple Choice)
4.9/5
(34)
Showing 21 - 40 of 76
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)