Where is the System class defined?

Java MCQ: Where is the System class defined?

a) java.lang package
b) java.util package
c) java.io package
d) java.net package

Answer:

a) java.lang package

Explanation:

The System class is defined in the java.lang package, which is automatically imported into every Java program. This class provides access to system resources such as standard input, output, and error streams.

Reference links:

https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top