30 May 2024

#CoreJava

#CoreJava

Key Concepts


Topic SubTopics (comma separated)
OOP Concepts Inheritance, Polymorphism, Abstraction, Encapsulation, Method Overriding
Classes & Objects Constructors, this keyword, super keyword, Overloading, Object Cloning
Access Modifiers public, private, protected, default, package-level access
Static & Final static variable, static method, static block, final class, final method
Data Types & Variables primitive types, type casting, var keyword, literals, reference variables
Strings immutability, StringBuilder, StringBuffer, String pool, equals vs ==
Arrays 1D array, 2D array, Arrays utility class, sorting, searching
Collections List, Set, Map, Iterator, HashMap
Generics bounded types, wildcards, generic methods, type erasure, raw types
Exception Handling try-catch, finally, throws, throw, custom exceptions
Java I/O InputStream, OutputStream, Reader, Writer, BufferedReader
NIO Path, Files, Channels, Buffers, Selectors
Multithreading Thread, Runnable, synchronization, sleep, join
Concurrency ExecutorService, Future, ConcurrentHashMap, Atomic classes, Locks
JVM Internals ClassLoader, Bytecode, Class loading, JIT, GC basics
Memory Model heap, stack, references, garbage collection, happens-before
Lambda & Functional Interfaces lambda syntax, Predicate, Function, Consumer, Method reference
Streams API map, filter, reduce, collect, flatMap
Annotations built-in annotations, custom annotation, Retention, Target, Marker annotations
Reflection Class object, getMethods, getFields, invoke, dynamic proxy
JDBC Connection, Statement, PreparedStatement, ResultSet, batch updates
Serialization Serializable, transient, serialVersionUID, writeObject, readObject
Date & Time API LocalDate, LocalTime, LocalDateTime, Instant, DateTimeFormatter
Modules (JPMS) module-info, requires, exports, opens, modular JARs
ClassLoader bootstrap loader, system loader, extension loader, delegation, custom loader
Garbage Collection G1 GC, CMS, GC roots, mark-sweep, pause time
JIT Compiler interpreter vs JIT, tiered compilation, inlining, escape analysis, optimization
Advanced Concurrency ForkJoinPool, CompletableFuture, parallel streams, RecursiveTask, locks
Bytecode & Instrumentation javap, Java Agent, ASM, bytecode inspection, class redefinition
Performance Tuning JFR, heap dump analysis, thread dump analysis, profiling, GC tuning

Interview question

Basic Level

  1. What is Java?
  2. What are the features of Java?
  3. What is JVM?
  4. What is JDK?
  5. What is JRE?
  6. What is bytecode?
  7. Why is Java platform independent?
  8. What are data types in Java?
  9. What is a variable?
  10. What are identifiers?
  11. What is type casting?
  12. What is implicit and explicit casting?
  13. What are access modifiers?
  14. Difference between local and instance variables?
  15. What is a class?
  16. What is an object?
  17. What is a constructor?
  18. Types of constructors?
  19. What is the main() method?
  20. Why is main() static?
  21. What is method overloading?
  22. What is method overriding?
  23. What is inheritance?
  24. Types of inheritance in Java?
  25. What is polymorphism?
  26. What is abstraction?
  27. What is encapsulation?
  28. What is the this keyword?
  29. What is the super keyword?
  30. Differences between == and equals()?
  31. What is an interface?
  32. What is an abstract class?
  33. Difference between abstract class and interface?
  34. What are packages?
  35. What is the final keyword?
  36. What is a static variable?
  37. What is a static method?
  38. What is a static block?
  39. Why is String immutable?
  40. Difference between String, StringBuilder, StringBuffer?
  41. What is an array?
  42. What is a 2D array?
  43. What is command-line argument?
  44. What is a wrapper class?
  45. What is autoboxing?
  46. What is unboxing?
  47. What is the default value of variables?
  48. What are escape sequences?
  49. What is the ternary operator?
  50. What is short-circuit operator?

Intermediate Level

  1. What is the Java Collections Framework?
  2. Difference between List, Set, and Map?
  3. Explain ArrayList vs LinkedList.
  4. Explain HashSet vs TreeSet.
  5. Explain HashMap vs Hashtable.
  6. What is LinkedHashMap?
  7. What is fail-fast and fail-safe?
  8. What is Iterator?
  9. What is ListIterator?
  10. What is Comparable?
  11. What is Comparator?
  12. Difference between compareTo() and compare()?
  13. What is generics?
  14. What are bounded type parameters?
  15. What are wildcards in generics?
  16. What is exception handling?
  17. What is try, catch, finally?
  18. What is checked exception?
  19. What is unchecked exception?
  20. What is throw keyword?
  21. What is throws keyword?
  22. What is custom exception?
  23. Difference between error and exception?
  24. What is Java I/O?
  25. What is InputStream and OutputStream?
  26. What is Reader and Writer?
  27. What is serialization?
  28. What is transient keyword?
  29. Explain Java Memory Model.
  30. Difference between stack and heap?
  31. What is garbage collection?
  32. What is finalize()?
  33. What is String pool?
  34. What is immutability in Java?
  35. What is a thread?
  36. How to create a thread?
  37. Difference between Thread and Runnable?
  38. What is synchronization?
  39. What is deadlock?
  40. What is race condition?
  41. What is thread safety?
  42. What is volatile keyword?
  43. What is daemon thread?
  44. What is thread lifecycle?
  45. What is JDBC?
  46. Difference between Statement and PreparedStatement?
  47. What is ResultSet?
  48. What is batch processing?
  49. What is metadata in JDBC?
  50. What is connection pooling?

Advanced Level

  1. Explain class loading mechanism.
  2. What is ClassLoader?
  3. Types of classloaders?
  4. Explain double-checked locking.
  5. What is the Java Memory Model (JMM)?
  6. What is happens-before relationship?
  7. Explain ConcurrentHashMap internals.
  8. Difference between synchronizedMap and ConcurrentHashMap?
  9. What is CopyOnWriteArrayList?
  10. What are atomic variables?
  11. What is Executor framework?
  12. What is Callable vs Runnable?
  13. What is Future and FutureTask?
  14. What is ThreadPoolExecutor?
  15. What is ForkJoinPool?
  16. What is parallel stream?
  17. Explain lambda expressions.
  18. What are functional interfaces?
  19. What is the Predicate interface?
  20. What is Function interface?
  21. What is Supplier and Consumer?
  22. What is Optional class?
  23. Explain Stream API operations.
  24. Difference between intermediate and terminal operations?
  25. What is short-circuiting in streams?
  26. What is method reference?
  27. What is reflection in Java?
  28. What are annotations?
  29. What is custom annotation?
  30. What is retention policy?
  31. What is proxy in Java?
  32. What is dynamic proxy?
  33. What is bytecode instrumentation?
  34. What is class reloading?
  35. What is Java Agent?
  36. What is NIO?
  37. Difference between IO and NIO?
  38. What is a selector in NIO?
  39. What is buffer and channel?
  40. What is memory mapped file?
  41. What is weak reference?
  42. Types of references in Java? (Soft, Weak, Phantom)
  43. What is GC tuning?
  44. Explain G1 GC.
  45. Difference between CMS and G1?
  46. What is ZGC?
  47. What is JIT compiler?
  48. What is Java Flight Recorder?
  49. What is JMX?
  50. What is JPA (Java Persistence API)?

Expert Level

  1. Explain JVM architecture in detail.
  2. What is a class file structure?
  3. Explain bytecode verification.
  4. What is method area in JVM?
  5. Explain constant pool.
  6. What is escape analysis?
  7. What is lock coarsening?
  8. What is lock elision?
  9. Explain biased locking.
  10. Explain OSR (On Stack Replacement).
  11. What is tiered compilation?
  12. Explain GraalVM.
  13. What is AOT compilation?
  14. Explain metaspace.
  15. Explain GC phases.
  16. Difference between stop-the-world and concurrent GC?
  17. How does ConcurrentMarkSweep (CMS) work?
  18. How does Shenandoah GC work?
  19. Explain JVM diagnostic commands.
  20. What is JFR profiling?
  21. How does JVM handle thread scheduling?
  22. What is false sharing?
  23. What is memory barrier?
  24. What is instruction reordering?
  25. What is CAS (Compare And Swap)?
  26. What is ABA problem?
  27. Explain VarHandle.
  28. What is off-heap memory?
  29. What is direct byte buffer?
  30. Explain Java Module System (JPMS).
  31. What is reflection performance impact?
  32. How to avoid reflection overhead?
  33. Explain Java Security Manager.
  34. What is code signing in Java?
  35. What is a classpath vs modulepath?
  36. Explain custom classloader use cases.
  37. What is thread dump analysis?
  38. What is heap dump analysis?
  39. Explain race detection tools.
  40. What is Zero GC?
  41. What is ThreadLocal memory leak?
  42. Explain CompletableFuture in depth.
  43. What is reactive programming in Java?
  44. What is Project Loom?
  45. What are virtual threads?
  46. How does stack frame behave in virtual threads?
  47. Explain structured concurrency.
  48. Explain performance tuning for high-frequency trading systems.
  49. Explain memory model violations.
  50. Explain build-time bytecode generation techniques.

Related Topics


   CoreJava_08   
   CoreJava_17   
   OOP Concepts   
   String Handling   
   Arrays   
   Exception_Handling   
   Collections   
   MultiThread   
   Generics   
   JDBC   
   Java_IO