ClassInstance (member) Variable ConstructorGetter/SetterMethodObject Instantiation (creation of objects)Use the ObjectArrays & CollectionsPolymorphism - extend, overrideCallbackObverver Design PatternInner Class - Nested ClassMemory LeaksenumUtilitiesfor loopfor each loop & var argswhile & iteratorsStringBuilderCompare StringCharAtequals() and hashCode()Try Catch, Finally, ThrowsThreadIntroductionAdvanced Concepts Reference - As neededAnnotationsRegular ExpressionsCompile & RunJava HomeCompileRunCreate a jar fileOtherfind command - extremely handy and usefulVisual VM

 

Class

All Java classes have the following structure. They are organized as below for better readability.

Access modifiers in Java - see and memorize this table

Instance (member) Variable

Constructor

this is used for chaining, super is used for super's constructor**

Getter/Setter

Method

Accesspermission returntype name(type parameter);

Object Instantiation (creation of objects)

Use the Object

 

Arrays & Collections

 

Polymorphism - extend, override

The entire philosophy of Object Oriented Programming is creating different "behaviors" of methods by "overriding" them. Overriding is achieved by extend a class and/or implements interfaces.

 

Callback

Obverver Design Pattern

 

Inner Class - Nested Class

Memory Leaks

If you need to access the instance variables of the outer class from the inner class, access them with instance.variable. This will ensure that if the instance is not available, the GC will clear out the reference to the variable. See faucet.java

Java Memory Leaks

 

enum

 

 

Utilities

for loop

for each loop & var args

while & iterators

StringBuilder

Compare String

CharAt

equals() and hashCode()

Try Catch, Finally, Throws

Java Exceptions - Geek for Geeks Java Exceptions - Stack Java Exceptions - Edureka Java Exceptions - Tutorial Point Code Java Exceptions - Jenkov

Thread

I have some examples in my javafun repo on threads, callback, future, etc.

Introduction

Jenkov Tutorial See files 1 to 6 first

Review my example code

Concepts Video - Defog Tech

Reentrant Lock - Defog Tech

Semaphore - Defog Tech

Producer Consumer

 

Advanced Concepts Reference - As needed

[Search Youtube "java thread Defog Tech"

Advanced Concepts](https://howtodoinjava.com/java/multi-threading/concurrency-vs-parallelism/) Use this as a rererence

Jenkov Tutorial See files 8 to rest more as a reference

 

Annotations

Annotations - Jenkov Video 1

Annotations - Jenkov html 1

Annotations - Jenkov Video 2

Annotations - Jenkov html 2

Regular Expressions

Regular Expressions - Youtube

Regular Expressions - javatpoint

Compile & Run

Java Home

Compile

We could also do:

Run

Create a jar file

 

Other

find command - extremely handy and useful

Visual VM