Which package is imported into every Java class by default?



Which package is imported into every Java class by default?

A. java.util

B. java.lang

C. system.lang

D. java.system

Answer:

B. java.lang

Explanation:

The package java.lang is imported into every Java class, so Option B is correct. 

The other options must be explicitly imported. Option A exists but must be explicitly imported.
Options C and D do not exist in the standard Java runtime.

Free Spring Boot Tutorial - 5 Hours Full Course


Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course

Comments