Bits of Java Part 1


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.


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:


- Package Declaration
- Import Statements
- Class Declaration


- Line Comments. 
  Ex: //

- Block Comments.
  Ex: /*
        Block Comment

- Documentation Comment:
  Ex: /**
       * Documentation

Class Members:

- Attributes / Instance Variables / Properties
- Methods / Functions


- 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


- Inherit state, behavior from parent class


- A way of hiding, restricting access to class components


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