Factual questions about java -
My teacher recently gave a practice test on Java and I'm curious to see how I was right / wrong Done I believe at least number one, so no explanation will help a lot.
-
In Java, a class can increase the abstract sections of any number.
Wrong. I do not quite understand that this is just because parents can fight in an inheritance class struggle?
-
In Java, it is illegal
< / Li>False, abstract classes are also not construes ...
-
In Java, there can be any sub-class in an abstract class.
In truth, I can not think of anything that is banned from it.
-
In Java, there is no restriction on the number of interfaces that implement the class.
-
It is not possible to apply a stack as a double-linked list, Because access to a stack requires only one end of the list, and a doubled-linked list provides access to both ends of the list.
True but it will not be very efficient.
1) This is incorrect because Java has multiple legacy Does not support A class can increase only one square, whether it is the essence or not. It can mutually multiply multiple classes (e.g., it extends B which extends C, so that it extends indirectly). A class can implement many interfaces Java does not support many methods, but it supports multiple interfaces, so it is better for several reasons.
2) First of all, the creator of the abstract class may be a liar because you are allowed to pass the abstract types as parameters, because of polymorphism, you will pass a solid subtype which you already have Had instantiated.
3) It is true
4) This is a degree (JVM implementation, but you will never kill it in practice)
5) You can easily Apply stack to double link list, it is a good exercise, it is also efficient because you are still doing everything on O (1).
Comments
Post a Comment