Exam 4: Defining Classes I
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
Write a Java method that returns the value of PI,where PI = 3.1415926535.
(Essay)
4.8/5
(40)
Java has a way of officially hiding details of a class definition.To hide details,you mark them as _________.
(Multiple Choice)
4.9/5
(32)
It is considered good programming practice to validate a value passed to a mutator method before setting the instance variable.
(True/False)
4.9/5
(38)
The modifier private means that an instance variable can be accessed by name outside of the class definition.
(True/False)
4.8/5
(35)
A variable whose meaning is confined to a method definition is called an/a
(Multiple Choice)
4.9/5
(36)
A more eloquent approach in implementing mutator methods is to return a ________ value.
(Multiple Choice)
4.8/5
(41)
A variable whose meaning is confined to an object of a class is called:
(Multiple Choice)
4.9/5
(31)
A method that performs some action other than returning a value is called a __________ method.
(Multiple Choice)
4.8/5
(41)
Method overloading is when two or more methods of the same class have the same name but differ in number or types of parameters.
(True/False)
4.7/5
(44)
When the parameters in a method have the same as instance variables you can differentiate them by using the _____ parameter.
(Multiple Choice)
4.8/5
(37)
Inside a Java method definition,you can use the keyword this as a name for the calling object.
(True/False)
4.8/5
(39)
The name of a method and the list of ________ types in the heading of the method definition is called the method signature.
(Multiple Choice)
4.8/5
(46)
Boolean expressions may be used to control if-else or while statements.
(True/False)
4.8/5
(46)
Write a method called Greeting that displays a personalized greeting given a first name.
(Essay)
4.8/5
(40)
Write a method called power the computes x< sup >n< /sup > where x and n and positive integers.The method has two integer parameters and returns a value of type long.
(Essay)
4.8/5
(37)
Write a driver program to test your Student class created in question #14.
(Essay)
4.8/5
(33)
In a method invocation,there must be exactly the same number of arguments in parentheses as there are formal parameters in the method definition heading.
(True/False)
4.8/5
(36)
Write a Java method that prints the phrase "Five purple people eaters were seen munching Martians".
(Essay)
4.9/5
(32)
Showing 21 - 40 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)