Get Started. It's Free
or sign up with your email address
Rocket clouds
OOP Java by Mind Map: OOP Java

1. Abstract Class

1.1. Mix between interface and concrete class

1.2. Can not be instantiate

1.3. Keeps the data and internal methods hidden for the outside world

2. Interface

2.1. Functional Interface - Lambda

2.2. Extending more that one class

2.3. Class implements Interface

2.4. it is used for polymorphism

2.5. Has fields - just name and methods - just body

3. Composition

3.1. Class-Class "has-a" relationship

3.2. Class is a Field

4. Inheritance

4.1. Superclass-Subclass "is-a" relationship

4.2. Subclass inherited the Superclass non private Fields and Methods - using extends keyword

4.3. Subclass can call the Superclass constructor, methods and fields with the keyword super

4.4. java use dynamic-binding when we calls a override method

4.5. Final or Private Class can not be Inherit

5. Encapsulation

5.1. Provides the security

5.2. Keeps the data and internal methods hidden for the outside world

6. Polymorphism

6.1. Мeans "many forms"

6.2. Every class that extends the same class can be define under the superclass type

6.3. calls only the superclass methods or use only superclass fields. If the subclass override a superclass method, java use dynamic-binding and calls the subclass method

7. Abstraction

7.1. System of objects that interact with each other

7.2. Provides advantage of code reuse

7.3. Breaking the Objects into more manageable pieces

7.4. Use the functionality of the class without knowing the implementation

8. Class

8.1. Blueprint that describes the Object

8.2. PascalCase Name

8.3. Access Modifier

8.3.1. Public, Private, Package-Private(fields and methods can be protected - subclass in different package have access to them )

8.4. Has Constructor

8.4.1. Default -Initialise all fields with default values

8.4.2. Overload with key word this - first statement in the constructor

8.5. Has State (Attributes/Fields/Properties)

8.5.1. Class Variable - Static

8.5.2. Local Variable - defined inside methods

8.5.3. Instance Variable - variables within a class but outside any method

8.6. Has Behaviour (Methods)

8.6.1. Static Methods

8.6.1.1. static methods can access all static variables and other static methods

8.6.1.2. Static methods cannot access instance variables and instance methods directly- they need some object reference to do so

8.6.2. Overload Methods

8.6.3. Override Methods

8.6.4. Instance Methods

8.6.4.1. Getter Methods - accessors

8.6.4.2. Setter Methods - mutators

8.6.4.3. Instance methods can directly access both instance methods and instance variables

8.6.4.4. Instance methods can also access static variables and static methods directly

8.6.5. CamelCase Name

9. Object

9.1. Declaration − A variable declaration with a variable name with an object type.

9.2. Instantiation − The 'new' keyword is used to create the object

9.3. Initialization − The 'new' keyword is followed by a call to a constructor. This call initializes the new object

9.4. .(dot) operator access the state and the behaviour

10. Enums

10.1. Enum is like Class

10.2. Implements Interface

10.3. Can not be Inherite

10.4. Default methods - toString(), values(), valueOf("string")

10.5. Can have constructor, fields, methods, abstract methods(they have to be override by each enum)

10.6. EnumMap<EnumName, String> enumMap = new EnumMap<EnumName, String>(EnumName.class);

10.7. EnumSet<EnumName> enumSet = EnumSet.of(place the enums here);