Java Programming - Objects and Collections - Discussion

12. 

Which of the following are Java reserved words?

  1. run
  2. import
  3. default
  4. implement

[A]. 1 and 2
[B]. 2 and 3
[C]. 3 and 4
[D]. 2 and 4

Answer: Option B

Explanation:

(2) - This is a Java keyword

(3) - This is a Java keyword

(1) - Is incorrect because although it is a method of Thread/Runnable it is not a keyword

(4) - This is not a Java keyword the keyword is implements


Wahid Ali said: (Apr 28, 2013)  
1. Run is not a keyword in java public void run () is predefined methods of thread class so run can't be keyword,

2. Import is predefined keyword of java which is used to import some standard java packages. For example-import java.lang.*; etc. So it is correct answered.

3. Default is correct answer, default in java used to mention class scope specification.

4. Implement is not correct answer, because its nothing in java, yes implements is a keyword which is used to interface implementation.

Jill Jung Juck said: (Sep 30, 2013)  
Interface is a keyword while implement is not :D.

Vikas Grover said: (Jan 24, 2014)  
Default is the convention of every construct of java by nature, if not explicitly specified.

Munu said: (Sep 15, 2014)  
I thought It question is for java keyword which are not used in java but reserved like go to, const.

Antrish Mishra said: (Sep 25, 2014)  
Is Box a keyword in Java?

Aarti Gupta said: (Mar 2, 2016)  
For the scope of default it is by default given to the variable. We never writes the default as access specifier. So how does it becomes a keyword.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.