
Discover Java, a programming language first released by Sun Microsystems in 1995, offering fast, secure, reliable performance and features like simple, object-oriented design, portable bytecode, platform independence, and multithreaded execution.
This lecture explains the difference between the JDK and the JVM, noting that the JDK includes the JVM, library classes, and development tools, while the JVM executes Java code.
Explore the JVM architecture, including the classloader, heap memory, stack frames, and method area, and how the execution engine uses an interpreter and a just-in-time compiler to run bytecode.
Learn how to download the JDK, install it on Windows (64/32‑bit) or other platforms, and set JAVA_HOME and PATH in your system environment variables.
Install and set up Eclipse for Java development by downloading Eclipse, selecting a workspace, creating a Java project, and configuring the associated libraries and JDK in the project properties.
Learn to create a Java project in Eclipse by right-clicking the Package Explorer, creating a project, source folders, a package, and a class with a main method.
Explore variables in java, including local, instance, and static variables, and distinguish primitive (int, long, float, double, boolean, char, byte) from non-primitive types, with examples and default values.
Explore core Java concepts by treating a class as a blueprint for creating objects, covering modifiers, superclass, interfaces, the class body, and lambda expressions alongside public, default, and private access.
Explore how to define a Java class with modifiers, a name, a superclass, an interface, and a body, and how it extends the object class, using Eclipse.
Explains how objects in Java have state (attributes) and behavior (methods) plus identity, and how classes create objects with properties and methods, including the main method and object references.
Discover how Java objects allocate memory in the heap and stack; non-static members copy per object while static members belong to the class, accessed via getH and setH.
learn to define a class with fields such as age and a static final maxAge, implement set and get methods, and use main to create objects and print ages.
Understand the Java main method as the entry point, defined as public static void main(String[] args), essential for the Java virtual machine to load and run the program.
Discover how object creation allocates memory in the heap and stores references on the stack, while each object gets its own copy of non static fields.
Learn java naming conventions for readability: class names start uppercase. Recognize that methods and packages begin lowercase, and constants use uppercase with final.
Explore how Java uses if-else decision making based on conditions, with true/false booleans, default values, and multi-branch examples that classify data as major or minor.
Explore how switch-case in Java evaluates conditions, uses breaks to avoid executing multiple cases, and handles string and integer inputs with a default.
Learn how the for loop in java uses initialization, condition, and update to iterate over data such as arrays, and print results with System.out.println.
Learn how the for-each loop iterates over data in Java, compare it to for loops, and understand how to avoid index errors with automatic data access.
Explore the labelled for loop in Java, learn how an outer loop controls an inner loop and how to break the outer loop from within the inner loop.
Explore when to use while loops vs for loops in Java, with guidance on conditions, finite and infinite iterations, and example tasks like printing even numbers from 1 to 1000.
Describe how the do-while loop in Java runs its body at least once, then checks the condition to continue, with examples showing i increments.
Understand how the break statement exits Java loops, breaking the inner loop and, under conditions, the outer loop. See how this optimization stops unnecessary iterations, with a 560 example.
Explain how the continue statement controls loop flow in Java by skipping the current iteration in for and while loops and restarting from the beginning.
Explore Java data types, distinguishing primitive and non-primitive types, including boolean, char, byte, short, int, long, float, and double, with default values, memory ranges, and usage guidelines.
Understand how Java methods declare return types, including void. Explore how primitive types like double, int, long, char, boolean and object references must match the signature.
Understand how constructors in Java initialize object state at creation, including default constructors, the new operator, and memory layout on the stack and heap.
Explain default and parameterized constructors in Java, show how this maps constructor parameters to class fields, differentiate local and class variables, and illustrate object-specific data and default constructor behavior.
Explore constructors in Java, including default and parameterized forms, and how the compiler handles them. Constructors have no return type and must match the class name during object creation.
Explore how Java constructors work, from default and parameterized forms to explicit and implicit super calls, inheritance, and constructor chaining using this and super.
Explore the static keyword in Java, covering static blocks, variables, methods, and nested classes; learn how static members load once per class and are accessible without objects.
Explore constructor overloading in Java, creating multiple constructors with different parameters, and learn how to override toString to display object data rather than the default address.
The static keyword in Java is a non access modifier for blocks, variables, methods, and nested classes; static blocks run when the class loads, initializing data before objects exist.
Explore how static variables and static methods share data across objects, and see how static blocks and inner static classes affect access and behavior in Java.
Explore how the this keyword identifies the current object and resolves local versus global variables, enables constructor and method calls, and passes the current instance as an argument.
Explore inheritance in Java, where child classes extend parent classes to acquire non-static members, enabling runtime polymorphism and method overriding across single, multi-level, and hierarchical inheritance.
Explore multilevel inheritance in Java by building a college, classroom, and student hierarchy, showing how properties and methods propagate, overridden toString behavior, and the benefits of hierarchical and polymorphic design.
Explore Java inheritance concepts, including single, multi-level, and hierarchical inheritance, and learn why Java forbids multiple inheritance due to runtime polymorphism, with private members and constructors not inherited.
Explore aggregation in Java as a has-a relationship where objects hold references to classes. See how an employee uses an address object to illustrate when to prefer aggregation over inheritance.
Explore how Java method overloading lets multiple methods share a name with different arguments to enable polymorphism. The compiler chooses the correct version based on argument types, not return type.
Discover how method overriding enables polymorphism by letting subclasses replace superclass methods, how runtime resolution picks the most specific implementation, and why static methods cannot be overridden.
Explore how interfaces in Java define contracts and why you can't instantiate them. Learn how default and static methods, and abstract methods, enable multiple inheritance and evolution across classes.
Explore how interfaces declare unimplemented methods, public static final fields, and how classes use the implements keyword to provide getSpeed, changeGear, applyBrake, and display.
Explore how Java 8 interface features, including default and static methods, let interfaces provide implementations and evolve without breaking implementing classes.
Explore Java 9 interface features, including private and static methods, and how private interface methods enable shared code for default methods while keeping access restricted.
Understand how abstract classes in Java differ from interfaces and concrete classes, and how abstract methods can have implementations, with extending, constructors, and overriding.
Compare abstract classes and interfaces in Java, explaining why you cannot instantiate abstract classes, how interfaces support multiple inheritance, and when to extend or implement in design.
Explore how interfaces and abstract classes shape references and object creation in java, showing compile-time versus runtime method dispatch, default methods, and how to access overridden methods in child classes.
Explore Java access modifiers: public, protected, default, and private, and learn how access changes within the same package, across packages, and with inheritance.
Discover how Java enums encapsulate constant data, support constructors and methods, enable iteration with values, and integrate with switch statements for type-safe, robust code.
This lecture explains how java enums use constants with optional data via constructors, shows private fields and getters, and demonstrates accessing enum values across classes with imports.
Explore enum in Java as objects with operations like plus and minus, using a switch and calculate method; learn private constructors and how to access data via getters.
Explore automatic type conversion in java, where compatible numeric types convert without explicit casting, and learn when explicit casting is required for noncompatible or cross-type assignments.
Learn how explicit type casting works in Java, including narrowing conversions between data types, when automatic conversion occurs, and how to perform explicit casts.
Learn type casting in Java using a B extends A example to convert a parent reference to the child type and access test1 and test2.
Explore type casting in java through auto promotion in expressions, where the compiler promotes operands to double, long, or float, and how explicit casting controls the final type.
Explore the final keyword in Java and how it restricts modifications to variables, methods, and classes, including blank and static final forms and constructor initialization.
Understand static final variables and a static block, final parameters and local finals, and why constructors and classes cannot be final, with compile-time implications.
Explore runtime polymorphism in Java through dynamic method dispatch and overriding. See how upcasting and reference types determine at runtime which method runs, with bank rate examples and animal behavior.
Compare static binding and dynamic binding, highlighting compile time versus runtime decision making, and explain how private, final, and static members are bound to their classes.
Understand static binding and dynamic binding in core java, and see how compile-time decisions differ from runtime method calls, including how inheritance and non-overridable static methods affect overriding behavior.
Explore static binding and dynamic binding in java, illustrating how compile-time and runtime decisions determine method calls based on reference type versus object type, including overriding in non-static methods.
Learn how the java instanceof operator checks if an object is an instance of a specific type, using animal and dog examples to illustrate results and inheritance.
Show how the Java instance of operator works with references and objects across inheritance, explain primitive versus wrapper types, and demonstrate type checks using class objects.
Explore encapsulation in Java, using private fields and public getters and setters to protect data, illustrated by a bank account example and data hiding.
Learn the advantages of encapsulation in Java, including flexible maintenance and secure data access via getters and setters, and note the drawback of longer code.
Understand how encapsulation in Java hides data with private variables and controlled access via getters and setters, illustrated by login authentication and private account balance examples.
Learn how encapsulation uses private variables with public getters and setters in Java. See how this keyword distinguishes fields from parameters and how setters validate name and age.
Illustrates encapsulation in java with a private school name and a read-write student name, showing getters, setters, and overriding toString to print the object state.
Learn how encapsulation protects fields in Java by turning public fields private and using getters and setters to prevent widespread changes, illustrated with a wrapper class and safe data access.
Avoid exposing internal arrays through getters in encapsulation in Java. Use cloning to provide safe copies and protect data integrity.
Explains encapsulation in Java by showing how returning a private list reference can let callers modify internal state, and demonstrates using a copy of the list to protect data.
Explore how abstraction hides internal complexity to expose a simple interface, using coffee machine and mobile device analogies to illustrate interfaces, features, and encapsulation.
Learn how abstraction hides implementation in Java by using classes and interfaces, with a practical example of employee types and salary calculation via abstract methods.
learn how abstraction in java uses an abstract calculate salary method in an employee hierarchy, implemented by contractor and full-time subclasses, with super constructors, inheritance, and polymorphic salary calculation.
Explore abstraction in Java with a coffee machine example, showing how a simple interface hides internal workings while users select espresso or cappuccino.
Explore a real-time abstraction example in Java through a coffee machine design, highlighting interfaces, implementations, configurations, and a map-driven approach to manage coffee selections.
Wrap primitive data types into objects using wrapper classes in Java, enabling boxing and unboxing for use with the collection framework and converting between primitive and object forms.
Explains why wrapper classes convert primitive types to objects, enabling collection usage, and covers the integer wrapper class with constructors and key methods like compare and valueOf in java.lang.
Learn how the integer wrapper class works, create wrapper objects, and convert between int, long, and double using methods such as compareTo, valueOf, intValue, and doubleValue.
Explore the integer wrapper class in Java with valueOf and parseInt, including how strings and characters convert to integers and return objects or primitives.
Explore how to convert binary and hexadecimal strings to integers using Java's Integer wrapper class, including radix-based parsing, valueOf, and handling number format exceptions.
Explore the Java double and boolean wrapper classes, their constructors from numbers and strings, and how parsing, value conversion, and max/min values are handled.
Explore static blocks in Java, learn how a static block runs when a class loads, before object creation, and how multiple blocks initialize static members in top-to-bottom order.
Explains increment and decrement operators in Java, including pre- and post-increment, their effects on variable values and order of evaluation, with example usage and outputs.
Explore how increment operators work in Java with practical examples, demonstrating post-increment effects on variables and their in-memory values and outputs.
Explore pre-increment and post-increment as well as decrement operators through practical examples, showing how they modify variable values and the resulting output.
Explore common interview questions and answers on OOP concepts for Java, download practice programs, and test your knowledge with topic-based exercises.
Explore the basics of single and multi-dimensional arrays in java, including fixed-size storage, index-based access, for loops, and array copying techniques.
Learn to sum a 2d array in java using nested for loops, iterating over rows and columns, and print each row on a new line.
Understand string immutability, the string pool and constant pool, and how string literals differ from new, how equals and == compare, and how concatenation affects string objects in memory.
Explore Java string class methods like substring, indexOf, toLowerCase, toUpperCase, valueOf, and replace, and grasp overloading, compare and compareTo, regular expressions, and string immutability.
Explore string class methods in java, including contains, endsWith, and equals with case-insensitive variants. Learn to format output with String.format and convert strings to bytes with getBytes, handling encoding issues.
Learn how string class methods in Java work, including getChars to copy characters, indexOf and lastIndexOf, and delimiter-based joins to build, analyze, and manipulate strings.
Explore core string class methods in java, including replace and replaceAll, split, startsWith, substring, charAt, and case conversion with toLowerCase and toUpperCase.
Explore Java string buffer basics: mutable string handling, constructors, capacity, append, replace, reverse, and ensure capacity, plus synchronization for multi-threaded safety.
This lecture demonstrates how string buffer capacity starts at 16 and increases as characters are inserted, with examples showing jumps to 34 and 70, and explains that capacity cannot decrease.
Compare string, string buffer, and string builder in java; strings are immutable, string buffer is synchronized, and string builder is faster but not thread-safe for concatenation-heavy tasks.
Understand how Java exceptions are objects that wrap events, halt program flow when unhandled, and differ between compile-time and runtime errors, including stack overflow and out of memory.
Discover how an exception travels up the call stack from main through a chain of method calls, showing last in, first out behavior and why unhandled exceptions terminate the program.
Explore how the call stack handles exceptions in Java, tracing method calls from test1 up to main and how try and catch blocks manage errors.
Explore why a program uses multiple exception handlers to tailor responses to different exception types, including the distinction between checked and unchecked exceptions and the benefits of specific handlers.
Learn how the JVM handles exceptions: creation of an exception object, throwing to a runtime handler, reverse order stack unwinding, and default handling when no catch block matches.
Learn to handle runtime exceptions in Java using try and catch blocks to prevent termination and enable continued execution after errors such as division by zero.
Explore the hierarchy of Java exceptions, inspect constructors and super calls in exception classes, and learn to use getMessage, getLocalizedMessage, and printStackTrace to diagnose runtime errors.
Learn common java exceptions, including arithmetic, index-out-of-bounds, class not found, file not found, null pointer, string index out of bounds, and number format, plus checked versus unchecked and runtime concepts.
Learn the type of exception in Java with examples such as divide by zero, index out of bounds, null pointer, and class not found, and compare checked and unchecked exceptions.
Explore how Java handles exceptions using try-catch, throw, and finally, with multiple catch blocks and optional finally for cleanup.
Master Java exception handling by using a single try block with multiple uniquely typed catch blocks to handle errors such as null pointer and index out of bounds.
Explore nested try-catch blocks in Java by tracing how test methods interact, how index out of bounds and automatic exceptions are caught, and how outer and inner handlers engage.
Explore nested try blocks and exception handling with parent and child tries, and learn how finally blocks always execute, even with automatic or index out of bounds exceptions.
Explore how the finally block executes after try and catch, even with returns or exceptions, and learn which statements run or are skipped in different scenarios.
Learn how to use the throw keyword in Java to raise exceptions under conditions, with examples like eligibility checks, and how try-catch and finally relate to checked versus unchecked exceptions.
Learn how the throws keyword communicates checked exceptions to callers, distinguish between checked and unchecked exceptions, and implement robust handling with try-catch blocks and compiler enforcement.
Design and use custom exceptions in Java by extending the base exception, and adding constructors with super initialization. Handle them with throws, catch, and clear error messages.
Explore the collection framework hierarchy, where list, queue, and set extend the collection interface, map appears as a separate package alongside implementations like linked list, vector, and hash set.
Learn how ArrayList in Java grows dynamically beyond its default size of 10, maintains order, and supports add, remove, find, sort, and replace operations while implementing the List interface.
Explore how ArrayList removal at a given index triggers internal shifting, impacting performance; end removals stay fast, start insertions are costly, reads stay constant.
Explore ArrayList features, including ordered elements, index-based access, and dynamic growth, while understanding that it is not synchronized and requires explicit handling in multi-threaded contexts.
Master creating and using an ArrayList in Java by defining a List<String>, choosing default or capacity constructors, and adding data with the add method.
Discover how ArrayList implements the List interface with add and remove methods, including overloading add, capacity growth, and internal details like wrappers and primitive-to-object conversion.
Read data from an ArrayList by index and by iterating with size(), understand wrapper types like Long and Byte, and apply casting to manage numeric values.
Discover three ways to read data from an ArrayList: for loop, for-each loop, and iterator, explaining hasNext, next, and generic types.
Learn how ArrayList add methods work, including add, add at index, and addAll with collections, plus handling index bounds and type considerations.
This lecture explains ArrayList methods clear, clone, contains, and indexOf; clear removes all elements, clone yields a copy (requires casting from Object), and contains performs a worst-case O(n) presence check.
Learn how ArrayList capacity works, including ensureCapacity to set a minimum size, how automatic resizing copies data, and how to use indexOf, lastIndexOf, contains, and isEmpty to efficiently query elements.
This lecture covers ArrayList remove methods: by index, by object, and remove all, with examples and discussion of remove range.
Learn how to remove items from an ArrayList using the removeIf method with predicates, enabling condition-based removal without loops.
Learn how ArrayList subList and toArray work, and compare set versus add by index, including retain or remove operations and inclusive/exclusive range behavior.
Store custom objects in a list by creating a student class with name, school, and an address, overriding toString, and using getters, setters, and an iterator to print data.
Explore how Java cloning works by contrasting shallow copies with deep copies using an employee and its person reference, showing shared versus independent object data.
Learn how Java cloning creates a copy of an object with the clone method, explains shallow copy of reference fields, and how implementing Cloneable enables custom override.
Learn how to implement cloning in Java by overriding clone and using Cloneable, and how shallow copies may share non-primitive fields like department, while deep copy requires separate copies.
Explore shallow copy with clone in java by implementing Cloneable, revealing how clone copies references like department objects, causing shared state; learn strategies for deep copying.
Understand deep copy vs shallow copy by implementing Cloneable and overriding clone, cloning the department child object to copy nested data and avoid shared references.
Learn how cloning works for primitive data types in Java by implementing the Cloneable interface and overriding clone, while handling CloneNotSupportedException and distinguishing deep copy from shallow copy.
Explore how the ArrayList clone method works, including Cloneable, overriding clone, and the shallow copy of primitive wrappers and reference types; learn how non-cloneable custom objects affect cloning.
Explore how Java anonymous inner classes override interface or abstract class methods without named classes, enabling multiple implementations within a single class and calling them through an interface reference.
Learn how to sort array lists in Java with Collections.sort for primitives and strings, and why custom objects need a comparator; a future video covers the solution.
Explore how to sort custom objects in Java by implementing Comparable or Comparator, override compareTo or compare methods, and sort by fields like name or age using Collections.
Learn how to use the comparator interface to sort a list of user defined objects by multiple fields, overriding compare methods and applying sort with different comparators.
Learn how to implement comparator with an anonymous inner class in Java to sort objects by population and language, using a single class and reusable, inline comparator logic.
Explore linked lists versus other lists, focusing on growth, resizing, and no data shifting, then illustrate insertion at beginning, end, and a given position using node and head pointers.
Explain how deletions in a linked list avoid shifting, compare beginning, end, and middle deletions, and note tradeoffs with time complexity tied to list length.
Learn how doubly linked lists differ from singly linked lists, their implementation in the Java collections framework, and how they support insertion order, forward/backward traversal, and not implement random access.
Explore the methods of linked list and how LinkedList implements List, emphasizing interface reference, inherited methods, and extra LinkedList methods like addFirst and addLast, plus index and iterator usage.
Explore how to use linked list with the List interface, covering constructors, add first and add last, collection-based initialization, and cloning concepts mentioned in the lecture.
Explain how to traverse a linked list with iterator and list iterator, using has next, next, has previous, previous, and get, for-each and index access, including no such element exceptions.
Explore linked list get methods in Java: get by index, getFirst, and getLast, and why using a LinkedList reference (not List) enables these accesses.
This video covers all remove methods for linked lists, including remove head, remove by index or object, and remove first, last, and all matching items.
Explore deque and queue operations on a linked list, including adding and removing from the head or tail, peeking at elements, handling empty lists, and distinguishing FIFO versus LIFO.
Explore linked list methods in Java, including insert, replace, size, indexOf, lastIndexOf, and toString, with practical examples and list data handling.
ArrayList grows by doubling capacity and provides fast indexed retrieval. LinkedList relies on node references, making deletions quick but traversal for access slow.
Explore the Java queue interface and its first-in-first-out behavior across linked lists and blocking queues, focusing on add, offer, remove, element, and peek.
Explore all queue methods in Java using a linked list: element, peek, poll, and remove; learn their empty queue behavior, including exceptions and null returns, plus offer in blocking queues.
Explore stack implementation in Java using vector, list, and collections. Learn last in first out behavior, top element access with peek, and push, pop operations, including empty checks.
The lecture explains hashing and the hashCode method from the Object class, showing how equal objects share a hash code and how string literals differ from new objects in memory.
Learn how Java's hashCode and equals methods, inherited from the Object class, control duplicate data in sets and maps, and how to override them for custom objects.
Explore how default hashCode and equals affect duplicates in maps when a custom object serves as a key, and why overriding is necessary for correct map behavior.
Explore how hashCode preserves data uniqueness in maps by generating hash codes, managing keys, and overwriting values when the same key is inserted, focusing on put and key sets.
Explore the internal working of hashmap in java, including buckets, hash codes, index mapping, and collision handling with linked lists, plus equals and put behavior.
Override hashCode and equals in your custom object to ensure identical data keys are treated as equal in a map and prevent duplicates.
Learn why overriding both hashCode and equals is essential for custom objects in hash map and hash set, preventing duplicates and ensuring correct key comparisons.
Learn how the Java ListIterator interface enables bidirectional traversal with next and previous, perform removal during iteration, and distinguish it from a standard iterator.
Explore how HashSet in Java uses hashing to store unique elements, leveraging equals and hashCode, with no fixed order, a default capacity of 16, and a 0.75 load factor.
Explain all constructors of hash set in Java, including default, with capacity, with load factor, and with collection, and how HashMap underpins the hash set, with initial capacity 16.
Explore how hash set add methods work internally, revealing hashing, bucket placement, duplicate removal, and iteration through elements using hashing and linked lists.
Explore add and addAll across three set implementations, showing how duplicates are prevented, how internal maps and hashCode and equals enforce uniqueness, and how insertion or natural ordering affects output.
Discover how to add a custom object to Java sets and maps, including a Person class, overriding toString, and the need for comparable or comparator to avoid exceptions.
Learn how remove, removeAll, and related operations work in hash-based sets, including hash codes, bucket indices, iterator-based removal, and the impact on order in HashSet versus LinkedHashSet.
Explore the retainAll method across set implementations, showing how it retains common elements from another collection and returns a boolean; note that custom objects require comparable or comparator for consistency.
learn how cloning in set classes works, showing how primitive values copy while object references may share data, and how overriding clone enables an independent copy from the original.
explain shallow copy of reference variables in java set classes, showing primitives and strings copy by value while object references are shared between original and clone; demonstrate clone usage.
Learn how to perform a deep copy of reference objects by implementing cloneable, overriding clone, and copying data one element at a time via an iterator to avoid shared references.
Understand shallow copy of a reference variable through cloning in a custom class, observe how cloned objects share references, and preview deep copy concepts.
Learn how to implement deep copy for objects in Java by overriding clone, implementing Cloneable, and cloning nested objects to avoid shared references in collections.
Explore how the contains method and contains all operation work across hash-based sets in Java, including HashSet, LinkedHashSet, and TreeSet, by tracing hashes, buckets, and nodes, and discussing time complexity.
Store a custom object in a tree set by implementing the comparable interface and defining compareTo for ascending order; handle class cast exceptions and choose a name-based key.
Learn how to store custom objects in a tree set using comparator or comparable, with anonymous inner classes to sort by age or name.
Learn how hash sets handle duplicate data with primitive and custom objects, and why overriding hash code and equals is essential for correct deduplication.
Explore tree set specific methods in java, including ceiling, floor, descending set and iterator, first and last, higher and lower, and headSet with inclusive and exclusive options, with practical demonstrations.
Explore the internal workings of java's hash map by examining how put stores key-value pairs into a 16-bucket structure, creates entry nodes, handles collisions, and supports get operations.
Explore java map classes—hash map, linked hash map, and tree map—focusing on unique keys, non synchronized behavior, and constructors with capacity and load factor.
Explore the EntrySet concept in HashMap classes, accessing map entries via entry, iterating with for-each, and comparing hash map and tree map order and behavior.
Explore hash maps in Java, using put, putAll, and putIfAbsent, and see how duplicate keys override values and removal works.
Explore java map operations by observing how clear empties the map, containsKey and containsValue checks, and get key and get value usage with replace and remove methods.
Explore all replace methods in HashMap classes, including single key-value replacement, conditional replace, and replace all with a bi function, and compare behavior across HashMap, LinkedHashMap, and TreeMap.
Explore storing custom objects in map classes, compare hash, linked hash, and tree map behavior, including key ordering and object printing, and learn that custom keys require comparable or a comparator.
Store custom objects in a TreeMap by implementing Comparable and overriding compareTo to sort by name or age. Learn to avoid class cast exceptions and when to use a comparator.
Use a custom comparator with TreeMap to sort Employee keys by age or name, via an anonymous inner class. Avoid class cast exceptions by implementing comparators for ascending order.
Explore how Java collections can use Object as the key and value to store any data. Not specifying data types makes handling harder in maps and lists.
Explore TreeMap specific methods, including cloning, descending map and keys, first and floor entries, floor key, and getOrDefault, while understanding natural key ordering and navigable map behavior.
this lecture demonstrates treemap methods such as headMap, subMap, keySet, and values, and shows how inclusive and exclusive bounds affect outputs like first and last entries.
Explore how hash map and tree map handle null keys and values, why only one null key is allowed in hash map, and null pointer and class cast exceptions.
Explore how map compute methods modify values for specific keys using a mapping function, handle absent or null values, and understand related exceptions.
Explore the ceilingEntry method in TreeMap: it returns the first entry with a key greater than or equal to a given key, or null if none exists.
Explore writing data with two threads using a hash map and a fixed thread pool. Learn about concurrency, non synchronized access, and awaiting termination to ensure tasks complete.
Learn to read and write a map using two threads in Java, handling keys and values concurrently in a house map scenario, with iteration.
Demonstrating writing to and reading from a shared map with a fixed thread pool, the lecture highlights concurrent modifications exceptions when multiple threads access the map.
Discover how a concurrent hash map uses bucket-level locks and segments to support high read and write concurrency, avoiding locks on the entire map, and compare with synchronized maps.
Explore how the queue interface and its methods add, remove, poll, and element implement first in, first out and head retrieval, including null on empty.
Explore how a hash table stores unique elements, disallows null keys, and contrasts with maps in multi-thread contexts, highlighting performance considerations and synchronization implications.
Sort collections in java with the sort method and a custom class via the comparable interface. Implement compareTo to sort by age for a customer.
I am designing Core Java course, in such a way that, anyone can understand easily without any prior knowledge of programming language. As a part of course I am adding lots of example with notes and live coding in eclipse.
Each Topics are covered in very details. with lot of Assignments which will help you for interview. Once you finish this course, you would able to answer any questions and will get lot of confidence in Java programming.
Core Java Includes:
1. What is Java
2. Features of Java
3. JDK, JRE and JVM
4. JVM Architecture
5. Variables and Data Types in Java
6. Increment and decrement operators in java
7. Java If Statement
8. Java if-else Statement
9. Nested-if
10. Switch Statement
11. For Loop In Java
12. For-each or Enhanced for Loop
13. While Loop In Java
14. Java Break Statement
15. Java Continue
16. Class, Object and Method
17. Static and Non-Static Member Of Class
18. Naming convention in Java
19. Constructor in Java
20. Return Type in Java
21. Access Modifier
22. This keyword in Java
23. Method Overloading In Java
24. Inheritance in Java
25. Method overriding In Java
26. Interface in Java
27. Abstract Class in Java
28. Super keyword in java
29. Instance Initializer block
30. Final Keyword in Java
31. Java instanceof operator.
32. Encapsulation in Java
33. Static Block in Java
34. Enum in Java
35. Type Casting in Java
36. Runtime polymorphism
37. Abstraction in java
38. Array in Java
39. String in Java
40. Stringbuffer in Java
41. Stringbuilder in Java
42. Exceptional Handling in Java
43. Throw Keyword
44. Throws Keyword
45. Finally Block
46. Collection Framework Architecture
47. Array List
48. Linked List
49. Set
50. Hash Set
51. Linked Hash Set
52. Tree Set
53. Map
54. Hash Map
55. Linked Hash Map
56. Tree Map.
57. Hash Table
58. Sorting in Collection
59. Comparable interface
60. Comparator interface
61. Multithreading in Java
62. Life cycle of a Thread
63. Thread Scheduler in Java
64. Thread Methods
65. Java Thread Pool
66. Java Thread Group
67. Java Garbage Collection
68. Synchronization in Java
69. Deadlock in java
Other topics update are in progress, Below topic will be updated soon.
Properties file in Java
Java I/O
Java Programs