Core Java Interview Questions
Questions Answers Views Company eMail

Can we instantiate Interfaces?

Ericsson,

7 13259

What do you mean by the term transient?

Ericsson,

5 9094

What are the two ways you can synchronize a block of code?

Ericsson,

5 12211

Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

Ericsson,

7 9182

How can you sort dates?

TCS,

2 8082

Why to give the file name same as the public class name in java?

3 5859

Is there any use of an abstract class which has no methods and no attributes?

Wipro,

1 4176

If your team member writes code with lots of static variables and static methods, will it cause any side effects?

KPIT,

3 6227

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you recommend and why?

KPIT,

5 7085

I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do?

KPIT,

3 5647

There is a Banking application. It has 2 types of account, Savings and Current. Write a method calculateInterest by passing an ArrayList of these account objects and calculate Interest accordingly. Write code for this situation

ABC, KPIT,

1 2668

If two threads call a static method at the same point of time, what will happen?

KPIT,

3 7579

There are 2 methods in a class. Both have the same method signature except for return types. Is this overloading or overriding or what is it?

KPIT,

9 10910

There are 2 classes, 1 LandAnimal and another WaterAnimal. There is another class Animal which wants to have the properties of both LandAnimal and WaterAnimal. How will you design this situation?

KPIT,

6 8776

I have a String s = java; What is the output when I say s.replaceAll('j', 'k'); Also what is the value of s after replacing?

KPIT,

8 9075


Post New Core Java Questions

Un-Answered Questions { Core Java }

How can we make a class virtual?

626


what is object slice?

1562


What is your platform?s default character encoding and how to know this?

1738


Is java util regex pattern thread safe?

506


What is java Applet?

636






What is difference between fail-fast and fail-safe?

576


What do you know about the garbage collector?

600


What is composition in java?

713


What is mvc in java?

544


Can we declare an interface as final?

557


What are the supported platforms by java programming language?

547


What is a layout manager and what are different types of layout managers available in java awt?

704


What string is utf8?

533


How do you write a scanner class in java?

553


What is meant by class loader? How many types are there?

662