which one of the following is not a legal declaration for top level classess or interfaces?
a. public abstract interface Test{}
b. final abstract class Test{}
c. abstract interface Test{}
d. public abstract class Test{}
Answers
Answer:
The correct answer is abstract interface Test{}.
Explanation:
This concept is mainly used in programming language of Java.
In java, a JUnit is used for purpose of writing the test cases; such as abstract classes is helpful for normal classes and methods. It supports a various kinds of inheritance.
The legal declaration of top classes or interfaces is:
1. Public abstract interface Test{}
2. Final abstract class Test {}
3. Public abstract class Test{}
The abstract interface test{} is not the legal declaration of top classes or interface due to it not being a static and not protected.
#SPJ2
Answer:
c. abstract interface Test{}.
Explanation:
The abstract interface test{} is not the legal declaration of top classes or interface due to it not being a static and not protected.
The legal declaration of top classes or interfaces is:
1. Public abstract interface Test{}
2. Final abstract class Test {}
3. Public abstract class Test{}
#SPJ2