Java Intro
Java Intro
ADVANTAGES OF JAVA
1.)Java is a Simple Programming Language.
2.)Java is a Secured language.
3.)Java is a Portable language.
4.)Java is a Platform Independent Language.
5.)Java Provides Rich built-in Libraries,which helps user to perform
the complex jobs easily.
6.)Java Supports Oops Principles Such as
Encapsulation,Inheritance,Polymorphism,Abstraction.
DISPLAY STATEMENTS:
It is used to print the user written statements on the console.
*Java provides 2 display statements:
1.) System.out.print() : Print will print the data and move the cursor to
next position of same line.
*we cannot use it without passing the data.
2.) System.out.println(): Println will print the data and move the cursorto
initial position of next line.
*we can use it without passing the data also.
Note:
The data stored inside variable it is not permanent, it is Temporary
data.
CREATE A VARIABLE:
Syntax: datatype identifier; (Variable Declaration Stmt).
CREATE MULTIPLE VARIABLE IN SINGLE STMT:
Syntax: datatype identifier1,identifier2……identifier_n;
*) Types of Datatypes:
Primitive datatypes.
Non primitive datatypes.
Non Primitive Datatype: The datatypes which are used to store non
primitive data are known as non primitive datatypes.
*Non-primitive data: It is a multivalue data which cannot be stored in
one block of memory.
*we need multi block of memory.. such as Array,Object.
*In java every classname is a Non-primitive datatype.
*null keyword is the default value for all non-primitive datatypes.
*we can create non-primitive variables(Reference variables) with the
help of non-primitive datatype.