Tag: technology

Questions Related to technology

  1. Visible only inside the package

  2. Visible only in the class and its subclass in the same package

  3. Visible in all classes in the same package and subclasses in other packages

  4. Visible only in the class where it is declared


Correct Option: C
  1. All of these

  2. (C) & (E)

  3. (A), (C) & (E)

  4. (B),(C) & (D)


Correct Option: D
Explanation:

To solve this question, the user needs to have knowledge about the initial version of Java and the keywords that were reserved but not used. The user must then identify which options list the correct keywords.

The correct answer is:

D. (B),(C) & (D)

Explanation:

In the initial version of Java, the keywords "const" and "goto" were reserved but not used. The keyword "inner" was not reserved at all in the initial version of Java. The other options, "union", "boolean", and "synchronized" were not keywords in the initial version of Java.

Therefore, options (A) and (C) are incorrect as they include options that were not reserved in the initial version of Java. Option (B) is incorrect as "boolean" was not a reserved keyword in the initial version of Java. Option (D), on the other hand, correctly lists all the keywords that were reserved but not used in the initial version of Java, which are "const", "goto", and "inner".

The Answer is: D. (B),(C) & (D)

  1. private

  2. b.final

  3. c.protected

  4. d.don't use any keyword at all (make it default)


Correct Option: D
  1. Visible only inside the package.

  2. b.Visible only in the class and its subclass in the same package.

  3. c.Visible in all classes in the same package and subclasses in other packages.

  4. d.Visible only in the class where it is declared.


Correct Option: C