30 May 2024

#CoreJava

#CoreJava

Key Concepts


S.No Topic Sub-Topics
1Setup & BasicsJDK Install, PATH Setup, IDE Setup, Hello Java, javac/java
2Java FundamentalsData Types, Variables, Operators, Comments, Naming Rules
3Control Flowif/else, switch, loops, break/continue, nested loops
4MethodsMethod syntax, parameters, return types, overloading, static
5OOP BasicsClass, Object, Constructor, this keyword, instance vs static
6Encapsulationprivate, getter/setter, access modifiers, immutability, POJO
7Inheritanceextends, super, overriding, runtime polymorphism, final keyword
8Abstractionabstract class, interfaces, default methods, multiple inheritance, design purpose
9Polymorphismmethod overriding, overloading, dynamic binding, instanceof, casting
10Packages & Importspackage keyword, import, naming conventions, JAR basics, folder structure
11Exceptions Basicstry/catch, finally, throw/throws, checked vs unchecked, stacktrace
12Custom Exceptionscreate exception, exception hierarchy, multiple catch, global handling, best practices
13StringsString pool, immutability, common methods, compareTo, StringBuilder/Buffer
14Arraysdeclaration, initialization, iteration, multidimensional, Arrays utility
15Collections OverviewCollection interfaces, List/Set/Map, ArrayList, LinkedList, HashMap
16Genericstype parameters, wildcards, bounded types, generic methods, raw types
17Streams APIstream(), filter(), map(), reduce(), collectors
18Functional InterfacesPredicate, Function, Supplier, Consumer, method references
19Lambda Expressionssyntax, lambda as variable, target types, closures, best practices
20Concurrency BasicsThread class, Runnable, thread states, start vs run(), sleep
21Synchronizationsynchronized, volatile, race condition, deadlock, lock ordering
22Executor FrameworkExecutorService, Future, Callable, Thread pool, submit/invoke
23File I/O BasicsFile class, InputStream, OutputStream, Reader, Writer
24NIO & Path APIPath, Files utility, Channels, Buffers, Directory walking
25JVM ArchitectureClassloader, memory structure, bytecode, JIT, Heap & Stack
26Garbage CollectionGC algorithms, references, finalize(), tuning, memory leaks
27ReflectionClass object, getMethods(), newInstance(), annotations, metadata
28JDBC BasicsDriverManager, Connection, PreparedStatement, ResultSet, commit/rollback
29Design PatternsSingleton, Factory, Strategy, Builder, DAO
30Testing & Build ToolsJUnit basics, assertions, Maven, Gradle, logging

Interview question

Basic

  1. What is Java and why is it platform independent?
  2. Explain JVM, JRE, and JDK.
  3. What are primitive data types in Java?
  4. Difference between == and equals()?
  5. What is class and object?
  6. Explain method overloading.
  7. Explain method overriding.
  8. What is inheritance?
  9. What is polymorphism?
  10. What is abstraction?
  11. Difference between abstract class and interface?
  12. What are access modifiers?
  13. What is a constructor?
  14. What is the use of static keyword?
  15. What is final keyword?
  16. What is package in Java?
  17. What is exception?
  18. Difference between checked and unchecked exceptions?
  19. What is try-catch block?
  20. What is String immutability?
  21. Difference between String, StringBuilder, StringBuffer?
  22. What is array?
  23. What is wrapper class?
  24. What is autoboxing and unboxing?
  25. What is garbage collection?

Intermediate

  1. Explain Java memory areas.
  2. Difference between Stack and Heap?
  3. What is Java Collections Framework?
  4. Difference between List, Set, and Map?
  5. Difference between ArrayList and LinkedList?
  6. Difference between HashSet and TreeSet?
  7. Difference between HashMap and Hashtable?
  8. What is Iterator?
  9. Difference between Iterator and ListIterator?
  10. What is fail-fast and fail-safe?
  11. What are generics?
  12. What is type erasure?
  13. Explain Comparable and Comparator.
  14. What is Java I/O?
  15. Difference between byte stream and character stream?
  16. What is serialization?
  17. What is transient keyword?
  18. Difference between File and Path?
  19. What is multithreading?
  20. Difference between Thread and Runnable?
  21. What is thread lifecycle?
  22. What is synchronization?
  23. What is deadlock?
  24. What is volatile keyword?
  25. What are daemon threads?

Advanced

  1. Explain Java memory model.
  2. What are soft, weak, and phantom references?
  3. How garbage collection works internally?
  4. What are different GC algorithms?
  5. What is ConcurrentHashMap?
  6. Difference between synchronized and Lock?
  7. What is ExecutorService?
  8. Difference between Callable and Runnable?
  9. What is Future?
  10. What is CompletableFuture?
  11. Explain Java NIO.
  12. Difference between IO and NIO?
  13. What is immutability?
  14. How to create immutable class?
  15. What are functional interfaces?
  16. What are lambda expressions?
  17. What is Stream API?
  18. Difference between map() and flatMap()?
  19. Difference between intermediate and terminal operations?
  20. What is Optional?
  21. What is method reference?
  22. What are default methods in interface?
  23. What is parallel stream?
  24. What are spliterators?
  25. What is memory leak in Java?

Expert

  1. Explain class loading mechanism.
  2. What are different class loaders?
  3. How JVM handles exceptions internally?
  4. What is escape analysis?
  5. What is JIT compiler?
  6. Difference between deep copy and shallow copy?
  7. How does HashMap work internally?
  8. Why HashMap allows one null key?
  9. What is resizing in HashMap?
  10. How ConcurrentHashMap avoids locking?
  11. Explain happens-before relationship.
  12. What is ForkJoin framework?
  13. What is reactive programming in Java?
  14. Explain Java module system.
  15. What is metaspace?
  16. Difference between PermGen and Metaspace?
  17. How to tune JVM performance?
  18. What are JVM options?
  19. How to analyze memory leaks?
  20. Explain Java design patterns usage.
  21. How Streams improve performance?
  22. What is backpressure?
  23. Explain non-blocking concurrency.
  24. What is GraalVM?
  25. How Java supports high scalability systems?

Related Topics


   CoreJava_17   
   Java Fundamentals   
   Collections   
   MultiThread