Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques 241. What is the purpose of the File class?

The File class is used to create objects that provide access to the files and directories of a local file system.

Is it helpful? Add Comment View Comments
 

Ques 242. What is a socket?

A socket is an endpoint for communication between two machines.

Is it helpful? Add Comment View Comments
 

Ques 243. How do I convert a numeric IP address like 192.18.97.39 into a hostname like java.sun.com?

String hostname = InetAddress.getByName("192.18.97.39").getHostName();

Is it helpful? Add Comment View Comments
 

Ques 244. How can my application get to know when a HttpSession is removed?

Define a Class HttpSessionNotifier which implements HttpSessionBindingListener and implement the functionality what you need in valueUnbound() method. Create an instance of that class and put that instance in HttpSession.

Is it helpful? Add Comment View Comments
 

Ques 245. How will you invoke any external process in Java?

Runtime.getRuntime().exec('.)

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2021 WithoutBook