1. What keyword do I use to have a derived class call methods of its base class?
ID: 3841954 • Letter: 1
Question
1.
What keyword do I use to have a derived class call methods of
its base class?
2.
What is the purpose of keyword extends?
3.
What is the purpose of keyword final?
4.
Using Java Naming Specifications declare the following with the name “three dimensional area”?(Assume that data types and return types are“double”and access specifiers are“public”
Class
function/method
Constant
variable
5.
What is keyword static used for?
6.
How often can the state of a constant change?
7.
What does an object
’
s member function read/write the state of?
8.
How do I read or write the data associated with the class it
self?
9.
What object model does maven use for code management?
10.
What 2 main techniques can be used to build a project in maven?
11.
Under what condition must a class be declared abstract?
12.
What is the purpose of keyword default?
13.
Give an example of a list (or other collection) that
exhibits polymorphism?
14.
What type of data may be declared and initialized in an in
terface?
15.
Under what condition is it permissible for a subclass to
not implement a method from an abstract
superclass?
16. What keyword is used to refer to the current object?
17. How many Interfaces can be implemented by a single cl
ass?
18. How many interfaces can a subinterface extend?
19. In what two ways can we instantiate a thread?
20. What is the difference between multiprocessing and mul
tithreading?
21. How many Abstract Classes can a subclass extend?
22. What two techniques can be used to change the appearance of
a JavaFx UI?
23. What Java package are collections (data structures) locate
d in?
24. What are the benefits to Unit testing code (Junit)?
25. What 3 parameters are used in assertEquals()?
26. In assertEquals(), what is the delta argument used for?
27. Test Classes and methods build up into what larger testin
g structure?
28. What is the difference between autoboxing and unboxing?
29. If no access specifier is used, what type of default acc
ess is applied to a class?
30. What is the purpose of keyword protected?
31. What purpose do annotations serve?
Explanation / Answer
1.super keyword
2.Derives the parent properties
3.final class cannot be subclassed
4.function/method
5.Used for memory management
6. Final fields cannot be modified after they are initialized. They are initialized when the constructor is called, and keep their value for the rest of the object's
lifecycle.
8.Using FileReader and FileWriter
9.POM(Project Object Model) is used
12.Used to declare default values in a java annotation
16.this keyword is used
17.Any number of interfaces can be implemented
30.The main purpose of protected keyword is to have the method or variable can be inherited from sub
classes.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.