Please help me to answer this questions. Java language. 1. What keyword do I use
ID: 3842300 • Letter: P
Question
Please help me to answer this questions. Java language.
1. What keyword do I use to have a derived class call methods of its base class?
2. What 2 main techniques can be used to build a project in maven?
3. Give an example of a list (or other collection) that exhibits polymorphism?
4. What type of data may be declared and initialized in an interface?
5. Under what condition is it permissible for a subclass to not implement a method from an abstract superclass?
6. How many Interfaces can be implemented by a single class?
7. How many interfaces can a subinterface extend?
8. What two techniques can be used to change the appearance of a JavaFx UI?
9. Test Classes and methods build up into what larger testing structure?
Explanation / Answer
1. Using this keyword "extends" we can derive the class using the inheritance concept.
public class AA // AA is the base class
}
2.
Maven is also known as accumulator of knowledge.It mainly address two aspects while building any project.Firstly it explains about software building and bow it is build and coming to second one its explains about dependencies.It also comes with pre-defined targets for performing a certain tasks such as its packaging and code compilation.
3. Polymorphism means many forms. coming to classes a base class has, many forms the base class itself, and any of its subclasses.
Liquid--> coffee
--> milk
Here liquid has many forms and it is the base class. cofee and milk are sub classes.Talking in to chemistry part allotropes of carbon include diamond exibits polymorphism. Allotropy is a word refers to different forms of an element within the same phase.
4.Interface variables are static in nature.These variables cannot be instantiated in their own manner.It is declared using the interface keyword.
It is a class that cannot contain any members and cannot have a constructor and/or a destructor.The data which is fixed and cannot be modified that type of data will be present in the interface concept.For example final is keyword used to fixed data and cannot moify that data.