few java oop questiongs, please help 1. Choose the best definition of an object
ID: 3758058 • Letter: F
Question
few java oop questiongs, please help
1.
Choose the best definition of an object in the context of this course.
a thing
an instance of a class
something you wear
2.
Is ArrayList a subclass of ArrayList?
Yes
No
3.
In JavaFX which of the following can be set as the root UI element for a Scene?
GridPane
HBox
VBox
All of the above
4.
What is the size of a variable of type double in Java?
2 bytes
4 bytes
8 bytes
It depends on the compiler setting
It depends on the operating system
5.
Which of the following is true?
Abstract and final can be declared on a class
Abstract and final are contradictory and cannot be declared on a class
Interfaces can declared as private
Interface methods can be declared private
6.
How can you force a non-abstract (concrete) class to implement a set of methods?
Make the class inherit from an abstract class
Make the class implement an interface
Both A and B
You can not
7.
The signature of a method in Java consists of ____________.
method name
method name and parameter list
return type, method name, and parameter list
parameter list
8.
What is the minimum number of methods that must be defined in classB for it to compile with no errors?
public interface InterfaceA { void methodA(); }
public interface InterfaceB extends InterfaceA { void methodB(); }
public class ClassA implements InterfaceA
{
public void methodA() {}
public void methodB() {}
}
public class ClassB extends ClassA implements InterfaceB
{
public ClassB() {}
... <methods not shown>
}
No particular methods are required
methodA
methodB
methodA and methodB
methodA , methodB, and toString
9.
Which of the following is true?
Abstract and final can be declared on a class
Abstract and final are contradictory and cannot be declared on a class
Interfaces can declared as private
Interface methods can be declared private
A.a thing
B.an instance of a class
C.something you wear
Explanation / Answer
1.
B. an instnce of a class
2.
A. Yes
3.
D. All ofthe above
4.
C. 8 bytes
5.
B. Abstract and final are contradictory and cannot be declared on a class
6.
C. Both A and B
7.
C. return type, method name, and parameter list
8.
C. methodB
9.
B. Abstract and final are contradictory and cannot be declared on a class
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.