Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Core Java Interview Questions
Questions Answers Views Company eMail

Is it possible to write JAVA program without including any of the packages,such as "import*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }

3 3261

1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CPU schedules or executes these threads?


2 5122

2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?



3) Suppose you are a very rich person, having 50 rooms and you have lost the key for one of the room's. How effectively you can find this key? (Qs2 and Qs3 are related)


3 6688

Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?


1 4482

Suppose there is an Online shopping cart application having different objects like Cart, SelectionItem, Billing, COnfiguration, Authentication, Authorization, PersonalDetails etc. Out of this which one can be made a singleton pattern and why?


2 8844

What is Co-Variant return type in method overriding?


1 4465

7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?

CSC, Nagarro, RBS,

4 6167

Can an abstract class have a constructor?

RBS, Wipro,

1 8201

What is the life cycle of Servlet?

3 4129

JVM responsibility?


6 12493

explain Anonynous inner class?


6 6282

why is S capital in System.out.println ????

6 15633

what is difference between length and length()?

8 13684

how your day start in your company

1 2441

Post New Core Java Questions

Un-Answered Questions { Core Java }

Describe different states of a thread.


What are the main uses of java?


What is static data type in java?


When should I use a singleton?


What is args length in java?


Why main method is static in java?


How to perform selection sort in java?


define the terminology association.


What is the list interface?


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)


Explain what is Marker interface?


Can I declare class as static or private?


How we can make copy of a java object?


How to declare objects of a class ?


How do you add an element to a hashset in java?