We found these questions from the internet and keeps on adding to the list.
CORE JAVA BASICS
Difference between JRE, JVM, JDK?
Explain the basic flow structure of java execution environment (e.g. Role of Class loaders , Byte code verifiers, Security Managers )
Why java is called as platform independent?
What is byte code?
What do mean by Objects and Classes?
List down all access specifiers and explain there scope.
List down all modifiers and there use (e.g. abstract , final)
Why the main method is declared as public and static?
Can we call the main method inside any other method?
Explain System.out.println(). What are System, out and println here?
What will happen if we execute the statement System.out.println(null)?
List down difference between static members (variable and method), and instance members (variable and methods).
What do u mean by static block?
Differentiate between final, finally and finalize keywords in Java?
What do you mean by Wrapper classes what is need of wrapper classes
What do you mean by Auto boxing and Auto unboxing
Explain why all wrapper classes are declared as final.
Explain the working structure of enhanced for loop.
What do u mean by variable length argument?
What do u mean by static import?
Explain what is Inner class. Explain the usage an inner class.
What does u mean by anonymous class?
Explain the OOP concepts :- Abstraction ,Encapsulation, Inheritance , Polymorphism?
What do u mean by Binding What is difference between method overloading and overriding?
What do mean by static polymorphism and dynamic polymorphism
What do you mean by static binding and dynamic binding /early binding and late binding
Explain types of Inheritance in java? Does java support multiple inheritance? Explain.
Explain how to achieve Multiple inheritance in java
While doing overriding of method is it possible to change a return type of method? If Yes how if no why?
Can we able to overload a static method?
Can we able to override a static method?
Can we able to override private method?
What does u mean by abstract class and interface?
What are the differences between them?
Explain situation where we should use abstract class and where we should use interface?
Explain which one work faster.
Can we declare an abstract class without any abstract methods?
Can we declare an interface as abstract and/or final?
What do you mean by Tagged or makeable interface? Give examples from Java.
What do mean by casting? What is the difference between upward/implicit/automatic and downward /explicate/forcefully casting?
Explain the process of Exception Handling? Which one is best default Exception handling or user defines Exception handling? Why
What do you mean by Exception? Give any Example?
Describe the exception hierarchy in Java (starting from Throwable)?
What is difference between Error Class And Exception Class
What is difference between Checked exception and UncheckedException?
What does u mean by cascaded catch blocks?
Is it compulsory to give finally block after try block
Is it compulsory to give catch block after try block
What is a use of throw and throws keyword
Explain rules in terms of exception while overriding methods?
When will you use a checked exception and when will you use unchecked (or runtime) exception, if you are creating a new exception?
Should you handle an Error, Exception and/or RuntimeException? Explain.\
Explain Why String class declares as final?
Explain why String class is called immutable class
Explain how to achieve mutable String?
Explain difference between StringBuffer class and StringBuilder class. Explain the situation where we have to use StringBuffer class and where we have to use StringBuilder Class.
Explain difference between “==” operator and equals() method with regarding String
How is the hashCode method implemented in a String class?
How is the hashCode method implemented in a Character class?
FILES AND STREAMS
What do mean by stream? List all types streams which is supported by java
What is Difference between Character stream and Byte stream
What is bit size required for Unicode, UTF-8 character set
What do you mean object Serialization what is a significant of it? list out class names which r use to achieve serialization
What do you mean by externalization and internalization what is a significant of it? List out which r use to achieve for same?
Explain a use of BufferedReader , SequenceInputStream PipedInputStream ,PipedOutputStream,File,DataInputStream, DataOutputStream classes
What is a transient varialble? How it is related to serialization?
COLLECTIONS AND GENERICS
What do you mean by collection API? List down some classes and interface from collection API?
What is differences between List, Map, Set
What are the differences between HashMap and Hashtable.
What are the differences between Array, ArrayList and LinkedList.
What are the differences between ArrayList and Vector.
What are the differences between Comparable and Comparator interface?
What are the differences between enumeration ,iterator and list iterator?
What do u mean by 1)ordered unsorted 2) unordered unsorted 3) unordered sorted in collection API
State a difference between LinkedList and ArrayList Class in Collection API
What does u mean by NavigableSet , NavigableMap interface in collection
State a difference between HashSet and TreeSet Class in Collection API
What does u mean by Generic collection? What is significant of it?
What does u mean by type safety? How to active it
What does u mean by Legacy classes and interfaces?
Explain about GregorianCalendar , BitSet , StringTokenizer, Runtime class, Scanner class
What is the time complexity of a HashSet?
What is the time complexity of a HashMap?
What do u mean by a Thread?
Explain the difference ways to create threads in java? Explain which one is good and why?
When using the traditional ways to implement a thread (especially before Java 5), which is the method that need to be overriden by a thread class?
What will happen if you start a thread twice using the start() method.
What will happen if you call the run method of a thread directly?
What will happen if you call the run method of a thread twice?
What is difference between wait(), sleep(), yield() methods?
What does u mean by a thread safe class? Give an example.
Explain ways to achieve thread safety.
What do mean by daemon threads?
What is synchronization? Why do we need synchronization?
Explain the use of volatile modifiers regarding multithreading?
What is the best way to stop a thread?
What is a dead-lock?
What do you mean by lock-ordering Deadlocks?
[Coding] Can you simlulate a deadlock in Java?
[Coding] Can you simlulate a deadlock in Java using explicit locks?
What are the four necessary conditions for a deadlock to happen?
How can you prevent deadlocks?
[Coding] Can you create producer consumer problem in Java using BlockingQueue?
What is Java concurrency package?
What are Executors and how do you use them?
What is an ExecutorService?
Explain Future and FutureTask
What is a CompletionService in Java concurrency?
What is a Semaphore?
What are latch synchronizers? Explain the working of CountDownLatch.
What is difference between connected architecture and disconnected architecture explain difference classes are use to achieve them in socket programming
What is use of ServerSocket class , Socket class , DataGramScoket and DataGramPacket class
What is use of InetAddress class
Give examples for port numbers or range of port numbers that are restricted to use and that may be used.
Explain the working structure of JDBC API
Explain 4 drivers available is java?
What is job of drivers? Explain significant of TYPE 4 Driver over all drivers;
Explain why jdbc API have only few classes and large set of Interface
What is Difference between Statement , PrepareStatement, CallableStatement
What is difference between executeQuery(),executeUpdate(), Execute () methods
Why event driven mechanism is based on Interfaces?
What do mean by callback method? give any example
What does u mean by Adapter classes? What is a use of these classes
Explain MVC Architecture regarding event driven mechanism
What do mean by Listeners? List down some listener methods
What is difference between Swing component and AWT components
What does u mean by a JavaBean class?
GARBAGE COLLECTION AND MEMORY MANAGEMENT
Explain Garbage collection processes of JVM?
Explain the memory structure in JVM
Explain memory structure which get allocated to a class in java
Does java support destructors like some other programming languages? Explain the working structure of GC() and finalize() method?
MORE JAVA QUESTIONS
Explain Reflection API and use of instanceof keyword?
What is the use of the Cloneable interface? Explain deep cloning/copy and shallow cloning/copy.
Explain by using how many ways we can able to load a class in to a JVM?
Explain different ways to achieve security in java
What do you mean by native methods?
How can you convert a String object as a Date object?
Please add more questions to this list through the comment section below.