Bits of Java Part 1

Introduction:

IDE(Integrated Development Environments):

For beginners there are many IDE’s but I’d recommend dr. java IDE. It is very light weight and easier to learn.
For advanced users there are IDE’s such as Eclipse, NetBeans, Android Studio, Intellijidea.

Installation:

Before installing the IDE make sure you have the latest JDK and JRE installed on your system. In windows system set path if it is not set automatically. JDK 7, 8, JRE 7, 8 can have co-existing installation without causing errors.


Java Bits:

Layout:

- Package Declaration
- Import Statements
- Class Declaration

Comments:

- Line Comments. 
  Ex: //

- Block Comments.
  Ex: /*
        Block Comment
       */

- Documentation Comment:
  Ex: /**
       * Documentation
       */

Class Members:

- Attributes / Instance Variables / Properties
- Methods / Functions

Package:

- A way of grouping or arranging files in folders.

Initializer Block:

- Executed before constructor
- When multiple constructors need to initialize the same instructions

Variable Declaration:

- Declare a data type

Variable Initialization:

- Assign values to variable

this Keyword:

- Access current class instance members

Access members of an object:

- objectname.attribute
- objectname.method()

Constructor Overloading:

- Constructors with same name but different types  parameter or different amount of parameters

Access Modifiers:

- Public: Can access from everywhere
- Private: Access only from same class
- Protected: Access from same class, sub / derived /child class, same package
- Default: Access from same class, same package

Primitive Wrapper Class:

- A class based on primitive data types

Inheritance:

- Inherit state, behavior from parent class

Encapsulation:

- A way of hiding, restricting access to class components

Polymorphism:

- Ability of object to take many forms
- Pass is-a test