JAVA Unit-1(III)

UNIT-1  PART-3

Separators
=>  Separators are symbols used to indicate where groups of code are divided and arranged.
=>  They basically define the shape and function of our code.
1.  Parentheses ()
o  Parentheses are used to contain lists of parameters in method definition and invocation.
o  Parentheses are used for defining precedence in expressions, containing expressions in control statements and surrounding cast types.
o  Separators are symbols used to indicate where groups of code are divided and arranged.
o  They basically define the shape and function of our code.

Variables
=>  The variable is the basic unit of storage in a java program.
=>  A variable is defined by the combination of identifiers, a type and an optional initialize.
=>  All variables have a scope, which defines their visibility and a life time.

Declaring a Variable: -
All variables must be declared before they can be used. The basic form of a variable declaration is shown here.
Type identifier [= value] [, identifier [=value]...];
Int a,b,c;    // declare 3 integers
Byte z = 22;  // initialize z
Char x = ‘X’;  // the variable x has the value ‘X’

Dynamic Initialization: 
=>  Java allows variables to be initialized dynamically using any valid expression at the time the variable is declared.

Data Types