This test contains 10 questions based on Java. Each question answered correctly awards you 1 point and each incorrect answer has a penalty of -0.25 points, no points are deducted for unattempted answers.
Select Test Type
You Get +1 for each correct answer and -0.25 for each incorrect answer
Time Left - minutes : seconds
Weakest access specifier among the following is
Which access specifier should be used with a class which should be available everywhere in the project.
Which of the following access specifier cannot be used with a class.
|protected||Both B and C|
Can we write two public classes within the same class.
Which access specifier allows methods of a class in package A to be used by a class in package B.
|default||Both A and B|
Which access specifier is used for hiding data of classes of a package from classes of another package.
Which access specifier should be used with a constructor so that this class cannot be inherited.
How many non public classes can be declared within the same file.
|Only 1||1 or more|
|only 2||Any number of classes.|
Which access specifier allows access to the class members that inherits this class.
Which access specifier are used for methods of an interface.
|default||Any of the above|