Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques 96. Why isn't there operator overloading?

Ans. Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn't even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note that some of the classes like DataOutputStream have unoverloaded methods like writeInt() and writeByte().

Is it helpful? Add Comment View Comments
Ques 97. What does it mean that a method or field is 'static'?
Ans. Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class. Static methods can be referenced with the name of the class rather than the name of a particular object of the class (though that works too). That's how library methods like System.out.println() work. out is a static field in the java.lang.System class.
Is it helpful? Add Comment View Comments
Ques 98. How do I convert a numeric IP address like into a hostname like java.sun.com?
String hostname = InetAddress.getByName("").getHostName();
Is it helpful? Add Comment View Comments
Ques 99. Difference between JRE/JVM/JDK/OpenJDK?
A Java virtual machine (JVM) is a virtual machine that can execute Java bytecode. It is the code execution component of the Java software platform.

The Java Development Kit (JDK) is an Oracle Corporation product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java Software Development Kit (SDK).

Java Runtime Environment, is also referred to as the Java Runtime, Runtime Environment.

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java programming language.[2] It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License (GPL) with a linking exception.
Is it helpful? Add Comment View Comments
Ques 100. Why do threads block on I/O?
Ans. Threads block on i/o (that is enters the waiting state) so that other threads may execute while the I/O operation is performed.
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook