Core Java Interview Questions
Questions Answers Views Company eMail

Can we instantiate Interfaces?

Ericsson,

7 14066

What do you mean by the term transient?

Ericsson,

5 9870

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

Ericsson,

5 12802

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 9911

How can you sort dates?

TCS,

2 8512

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

3 6183

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

Wipro,

1 4399

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

KPIT,

3 6641

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

KPIT,

5 7612

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 6047

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 2928

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

KPIT,

3 8001

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 11898

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 9447

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 10047


Post New Core Java Questions

Un-Answered Questions { Core Java }

What is method overloading in java ?

692


What are the classes of java?

670


What is an example of a boolean?

716


Why is a singleton bad?

710


Is 64bit faster than 32 bit?

720






What is a super method?

687


How many types of design patterns are there?

701


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

691


Explain the differences between static and dynamic variables?

755


What does next mean in java?

679


how come we know the object is no more used in the class?

5839


Can we override private method?

725


write a program that list all permutations of ABCDEF in which A appears before B?

2178


What is map and hashmap in java?

744


How do I get the | symbol on my keyboard?

715