Free · 20 topics · no sign-up
Core Java notes for students
Topic-wise Core Java notes with code examples, common mistakes and practice questions with answers. Read them on any phone, free, with no sign-up.
These notes follow the free BrainBit Infotech Teaching Core Java course, from your first System.out.println() to collections, streams, threads and JDBC. Each topic explains the idea in plain English, shows short programs you can compile and run, lists the mistakes beginners make and ends with practice questions. Read them in order if you are new to Java, or jump to the topic your class is on. For revision before a test, use the printable cheat sheet.
Part 1: Java Foundations
- Introduction to Java and your first programWhat Java is, JDK, JRE and JVM, bytecode, and compiling and running your first program.
- Java variables, data types and operatorsVariables, the 8 primitive types, String, casting, and arithmetic, comparison and logical operators.
- Java input and output: Scanner, printf and MathReading input with Scanner, the nextLine trap, printf formatting and the Math class.
- Java decisions: if, else and switchif, else if ladders, nested if, the classic switch and the new switch expression.
- Java loops: for, while and do-whilefor, while and do-while loops, break and continue, nested loops and patterns.
Part 2: Methods, Arrays & Strings
- Java methods: parameters, return values and overloadingDefining and calling methods, parameters, return values, pass by value, overloading and recursion.
- Java arrays: storing many valuesCreating arrays, indexes and length, for-each, searching and sorting, 2D arrays and java.util.Arrays.
- Java strings and StringBuilderString methods, immutability, equals versus ==, the string pool, StringBuilder and text blocks.
Part 3: Object-Oriented Java
- Java classes and objectsClasses, objects, fields and methods, constructors, this, toString and object references.
- Java encapsulation, static and packagesprivate fields, getters and setters, access modifiers, static members, packages and import.
- Java inheritance and polymorphismextends and super, constructor chaining, overriding, runtime polymorphism, instanceof and Object.
- Java abstract classes and interfacesabstract classes and methods, interfaces, default and static methods, and abstract class versus interface.
- Java exception handlingtry, catch and finally, checked versus unchecked, throw and throws, try-with-resources and custom exceptions.
Part 4: Collections, Generics & Streams
- Java wrapper classes, enums, records and genericsWrapper classes and autoboxing, enums, records, and generic classes and methods.
- Java collections: List, Set and QueueArrayList and LinkedList, HashSet and TreeSet, Queue, Deque, PriorityQueue and Iterator.
- Java maps and sortingHashMap, LinkedHashMap and TreeMap, counting with maps, Comparable and Comparator.
- Java lambdas and the Stream APILambda syntax, functional interfaces, method references, stream operations, collectors and Optional.
Part 5: Advanced Java & Capstone Projects
- Java file handling and the Date-Time APIReading and writing files with Files and BufferedReader, CSV data, LocalDate, Period and formatting.
- Java multithreading and concurrencyThread and Runnable, life cycle, join and sleep, race conditions, synchronized, executors and atomics.
- Java JDBC databases and modern JavaConnecting with JDBC, PreparedStatement, CRUD, ResultSet, transactions, and modern Java features.