Common Java Interview Questions

What are the default values in an array?

How do you loop around an array using enhanced for loop?

How do you print the content of an array?

How do you compare two arrays?

What is an enum?

Can you use a switch statement around an enum?

What are variable arguments or varargs?

What are asserts used for?

When should asserts be used?

What is garbage collection?

Can you explain garbage collection with an example?

When is garbage collection run?

What are best practices on garbage collection?

What are initialization blocks?

What is a static initializer?

What is an instance initializer block?

What is tokenizing?

Can you give an example of tokenizing?

What is serialization?

How do you serialize an object using serializable interface?

How do you de-serialize in Java?

What do you do if only parts of the object have to be serialized?

How do you serialize a hierarchy of objects?

Are the constructors in an object invoked when it is de-serialized?

Are the values of static variables stored when an object is serialized?

About Author

Myself KarthiQ, I am the author of this blog, I know ways to write a good article but some how I donot have the skills to make it to reach people, would you like help me to reach more people By sharing this Article in the social media.

Share this Article Facebook
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions