
Java Foundation_9
Authored by Rukumani CT_PG
Computers
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
_____automatically converts a primitive to the corresponding wrapper classes when needed if the generic type is specified in the declaration.
unboxing
Autoboxing
Boxing
AutoConversion
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The syntax for introducing a generic is to declare a _____parameter in angle brackets
actual
unformal
formal
real
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Method/field in a class (that is not a superclass) in a different package can access ___
If that member is private
If that member has default (package private) access?
If that member is protected?
If that member is public?
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Member in a superclass in a different package can access ___
If that member is private
If that member has default (package private) access?
If that member is protected?
If that member is public?
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
For overriding, the overridden method should follow that:
The access modifier must be the same or more accessible.
The return type must be the same or a more restrictive type, also known as covariant return types.
If any checked exceptions are thrown, only the same exceptions or subclasses of those exceptions are allowed to be thrown.
The methods must not be static.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An abstract class may contain any number of methods including ____
0
1
atleast 1
minimum 2
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
To which lines in the following code could you independently add static and/or final without introducing a compiler error?
1: abstract class Cat {
2: String name = "The Cat";
3: void clean() { }
4: }
5: class Lion extends Cat {
6: void clean() { }
7: }
1 & 5
1 & 3
3
1
2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?