Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques 11. What is the purpose of the System class?

The purpose of the System class is to provide access to system resources.

public static void main(String args[])
{
System.out.println("WithoutBook");
}

Is it helpful? Add Comment View Comments
 

Ques 12. What is java.io package in Core Java?

Java.io package provides classes for system input and output through data streams, serialization and the file system.

E.g
java.io.BufferedReader
java.io.FileReader

Is it helpful? Add Comment View Comments
 

Ques 13. What is data encapsulation?

Encapsulation may be used by creating 'get' and 'set' methods in a class (JAVABEAN) which are used to access the fields of the object. Typically the fields are made private while the get and set methods are public. Encapsulation can be used to validate the data that is to be stored, to do calculations on data that is stored in a field or fields, or for use in introspection (often the case when using javabeans in Struts, for instance). Wrapping of data and function into a single unit is called as data encapsulation. Encapsulation is nothing but wrapping up the data and associated methods into a single unit in such a way that data can be accessed with the help of associated methods. Encapsulation provides data security. It is nothing but data hiding.

Is it helpful? Add Comment View Comments
 

Ques 14. What is java.math package in Core Java?

Java.math package provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

E.g
java.math.BigDecimal
java.math.BigInteger

Is it helpful? Add Comment View Comments
 

Ques 15. What's the difference between J2SDK 1.5 and J2SDK 5.0?

There's no difference, Sun Microsystems just re-branded this version.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2021 WithoutBook