Exam 5: Defining Classes II
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
Converting from a value of primitive type to a corresponding object of its associated wrapper class is called:
Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
A
What is the purpose of Java's wrapper classes?
Free
(Essay)
4.8/5
(32)
Correct Answer:
The wrapper classes contain a number of useful constants and static methods.Wrapper classes accomplish two tasks: they produce class objects corresponding to values of primitive types,and they supply useful constants and methods.
Does an object created with a copy constructor reference the same memory location that the original object references? Explain.
(Essay)
4.8/5
(32)
Write a statement that creates and initializes a static variable named salesTax to 7.59.
(Essay)
4.8/5
(40)
Write a statement that creates a constant variable named TAX_RATE.The tax rate is 8.25%.
(Essay)
4.9/5
(33)
A class invariant is a statement that is always true for every object of the class.
(True/False)
4.8/5
(35)
To use a package,the program must contain an import statement that names the package.
(True/False)
4.8/5
(32)
Add accessor and mutator methods to the Book class created in question #13.
(Essay)
4.8/5
(33)
To create a package,you must add a package statement at the ____________ of each class file.
(Multiple Choice)
4.8/5
(36)
Wrapper classes provide a class type corresponding to each of the primitive types so that you can have class types that behave somewhat like primitive types.
(True/False)
4.9/5
(35)
When you use the assignment operator with variables of a class type,you are assigning a:
(Multiple Choice)
4.7/5
(34)
Showing 1 - 20 of 46
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)