Core Java Interview Questions
Questions Answers Views Company eMail

What is garbage collection in Java, and how can it be used ?

Infosys, HCL, Accenture, Wipro, Sara, SITS,

32 53023

Differentiate Vector and ArrayList?

Wipro, Max Telecom,

6 6436

Differentiate constructor and a method and how are it be used?


6 6963

What is an abstract class?


7 5858

How can final class be used?

Wipro, Accenture,

5 7696

By what default value is an object reference declared as an instance variable?


1 8954

Java support what type of parameter passing ?


7 10290

Explain the term serialization?


10 8180

Is there is any error if you have multiple main methods in the same class?


10 9499

What is Overriding and how can it be used?

Consagous, Wipro,

7 12256

Explain pass by reference and pass by value?

IBM, Wipro,

8 10181

In which way does a Primitive data type is passed ?

Sun Microsystems,

5 6472

What happens when a main method is declared as private?

L&T, DELL, Infosys, Sun Microsystems,

21 30658

Is there any need to import java.lang package?

Sun Microsystems,

13 13362

What is UNICODE?

3 3625

Post New Core Java Questions

Un-Answered Questions { Core Java }

Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx


Is it possible to declare abstract class as final?What happens if we do so?


The following program reads data (details of students) from a file named students.txt and converts it into e-mail addresses. The results are written to a file named studentemail.txt. students.txt consists of a number of lines, each containing the data of a student in colon delimited format: Last Name:First Name:Student Number Each input record is converted to an e-mail address and written to studentemail.txt in the following format: the first character of the last name + the first character of the first name + the last four digits of the student number + “” import*; public class EmailConverter { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new FileReader ("students.txt")); PrintWriter output = new PrintWriter(new FileWriter ("studentemail.txt")); String line = input.readLine(); while (line != null) { // Extract the information for each student String[] items = line.split(":"); // Generate the email address String email = "" + items[0].charAt(0) + items[1].charAt(0) + items[2].substring(4,8) + ""; email = email.toLowerCase(); // Output output.println(email); line = input.readLine(); } input.close(); output.close(); } } Rewrite the class so that it handles possible errors that may occur. In particular, it should do the following: • It should catch at least three appropriate exceptions that might occur, and display suitable messages. • At this stage, the program will not run correctly if there is an empty line in the input file. Change the program so that if an empty line is encountered, an exception is thrown and the empty line is ignored. This exception should be handled with the display of a suitable error message. • Before the e-mail address is added to the output file, check if the student number has 8 digits. If not, throw an InvalidFormatException (which the program should not handle itself)


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????


I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on


why we use merge option in hybernate pls give a ex snippet


What are the restrictions imposed by a Security Manager on Applets?.


explain the concept of virtual method invocation in polymorphism in detail?


Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification


What is Applet Stub Interface ?


How to print nodes of a Binary tree?


what is object slice?


hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea


How will you serialize a singleton class without violating singleton pattern?


Tell me about your ability to work under pressure