Menu

Tree [b5f55c] hfj /
 History

HTTPS access


File Date Author Commit
 collections&generics 2025-06-22 0x50-0x42 0x50-0x42 [f684c5] Wildcard
 exceptionHandling 2025-09-09 0x50-0x42 0x50-0x42 [b5f55c] Exception rules
 inheritance&polymorphism 2025-04-23 0x50-0x42 0x50-0x42 [13b1a4] removed
 interfaces&polymorphism 2025-06-17 0x50-0x42 0x50-0x42 [6b73d1] An important note on polymorphism
 lambdas&streams 2025-07-08 0x50-0x42 0x50-0x42 [8d6549] Pool Puzzle
 life&death_of_an_object 2025-05-02 0x50-0x42 0x50-0x42 [de1693] How long does an object live?
 numbers&statics 2025-05-11 0x50-0x42 0x50-0x42 [12a7c2] Be The Compiler
 .gitignore 2025-06-21 0x50-0x42 0x50-0x42 [3002ab] ignore
 README.md 2025-09-03 0x50-0x42 0x50-0x42 [9e84ba] read me

Read Me

Learning Java

This repo will contain only programs.

Contents

Collapse
  1. Inheritance and Polymorphism
    • 1/ → Inheritance.
    • 2/ → Polymorphism.
    • 3/ → Method overriding.
  2. Interfaces and Polymorphism
    • 1/ → Weird animals.
    • 2/ → Abstract and concrete class.
    • 3/ → Abstract methods.
    • 4/Object class.
    • 5/ → The price of using polymorphic references of type Object.
    • 6/ → Problems with Object.
    • 7/ → Inner Object.
    • 8/ → Casting an object reference back to its real type.
    • 9/ → How much Java cares about the methods in the class of the reference variable.
    • 10/ → Multiple inheritance in Java.
    • 11/ → Different classes implementing the same interface.
    • 12/ → Interfaces as polymorphic types.
    • 13/ → Invoking the superclass version of a method.
    • 14/ → One more thing about interfaces.
    • special/ → An important note on polymorphism.
  3. Life and and Death of an object
    • 1/ → Where things live.
    • 2/ → Where do instance variables live.
    • 3/ → Constructors.
    • 4/ → Parameterized constructors.
    • 5/ → Constructor overloading.
    • 6/ → Constructor overloading.
    • 7/ → Constructors and inheritance.
    • 8/ → Invoking a superclass constructor.
    • 9/ → Superclass constructors with arguments.
    • 10/ → Invoking one overloaded constructor from another.
    • 11/ → How long does an object live?
    • 12/ → How long does an object live?
  4. Numbers and Statics
    • 1/ → static methods--Math methods.
    • 2/ → difference between regular and static methdods.
    • 3/ → class with private constructor and static methods.
    • 4/ → static methods and non-static members.
    • 5/ → static variables.
    • 6/ → initializing a static variable.
    • 7/ → static final variables.
    • 8/final used with non-static variables.
    • 9/ → looking at some Math methods in Java.
    • 10/ → wrapping a primitive.
    • 11/ → wrapping a primitive.
    • 12/ → autoboxing.
    • 13/ → turning a String into a primitive number.
    • 14/ → turning a primitive into a String.
    • 15/ → number formatting.
    • 16/ → the format specifier.
    • 17/ → static imports.
    • brainBarbell/ → brain barbell.
    • SharpenYourPencil/ → Will this code compile?....
    • beTheCompiler/ → be the compiler.
  5. Collections and Generics
    • 1/ → The diamond operator and sorting in alphabetical order.
    • 2/ → Generic class.
    • 3/ → Generic methods.
    • 4/ → Sorting Song objects.
    • 5/ → Implementing the Comparable interface.
    • 6/ → Using a custom Comparator.
    • 7/ → Sorting only using Comparators.
    • 8/ → SAM or functional interfaces.
    • 9/ → Removing duplicates -- Using HashSet -- didn't work.
    • 10/ → Reference equality.
    • 11/ → Object equality.
    • 12/ → How a HashSet checks for duplicates.
    • 13/ → Java Object Law for hashCode() and equals().
    • 14/TreeSet in Java.
    • 15/TreeSet using Comparator.
    • 16/TreeSet with lambda functions.
    • 17/ → How TreeSet sorts its data.
    • 18/ → More about TreeSet.
    • 19/Map in Java.
    • 20/ → Unmodifiable list.
    • 21/ → Convenience factory methods.
    • 22/ → Using polymorphic arguments and generics.
    • 23/ → Incompatibility among List objects holding supertypes and subtypes.
    • 24/ → Wildcard.
    • 25/ → Using the method's generic type parameter.
    • 26/ → Methods using wildcard.
    • Difference
    • generics/ → List of subtypes accepted by method using generics.
    • important/ → Important.
    • important_hashCode_equals/ → Equality of objects.
    • sharpenYourPencil/ → Sharpen you pencil.
    • Generics
    • Wildcard → Important notes on wildcars.
    • Collection_API.png → Interfaces and classes in Collection API.
    • JavaObjectLaw.png → Java Object Law for hashCode() and equals().
  6. Lambdas and Streams
    • 1/forEach() in Java.
    • 2/ → Getting started with Stream.
    • 3/ → Chaining Stream operations.
    • 4/ → Stacking and combining the Stream operations.
    • 5/ → Customizing the building blocks.
    • 6/ → Guidelines for working with streams.
    • 7/ → Do stream operations change the original list?
    • 8/ → Basics of lambda expressions.
    • 9/ → Lambda expressions.
    • 10/ → Lambda expressions.
    • 11/ → Multiline lambda expressions.
    • 12/ → More on lambda expressions.
    • 13/ → Parameters in lambda expressions.
    • 14/ → How to know if a method takes a lambda expression.
    • 15/ → Stream operations.
    • 16/ → Method references.
    • 17/ → Collecting results in different ways.
    • 18/ → More terminal operations.
    • 19/ → Using the Optional wrapper class.
    • 20/ → An example demonstrating the use of the Optional wrapper class.
    • PoolPuzzle/ → Pool Puzzle.
    • Project/ → A Mini Project: Understanding how to use lambda expressions.
    • AnatomyOfLambdaExpression.png → Anatomy of lambda expressions.
    • StreamOperations.png → Stream operations.

Additional links

More links
  1. Collections.sort() in Java.
  2. Comparable in Java.
  3. Comparator in Java.
  4. Collectors in Java.
  5. Java Generics.
  6. Stream in Java.
  7. Optional in Java.
  8. List in Java.
  9. ArrayList in Java.
  10. Sequencer in Java.
  11. MidiSystem in Java.
  12. printf in Java.
  13. More on printf.