Java Classes Question:

Download Job Interview Questions and Answers PDF

What is the use of system class?

Java Classes Interview Question
Java Classes Interview Question

Answer:

Well it depends upon you for what purpose do use system class.
Say, System.in >> belongs to inputstream interface helps in inputting from the console.
whereas, System.out and System.err is used to print something on the console. when out is used with System class then you generally call print() and println() methods to print the stuff you want to. whereas when you use err with System class then you generally try to print error message.

Download Java Classes Interview Questions And Answers PDF

Previous QuestionNext Question
In this example class-var = new classname( ); class-var is a variable of the class type being created

A) True
B) False
A class is a template for an object, and an object is an instance of a class.

A) True
B) False