You are on page 1of 2

Access Specifiers

Public
Protected Keywords
Private
no access(defaulut) This is not Keyword, the top three are keywords

public class MyClass{


public static void main(String args[]){
System.out.println("Hi");
}
}

System.out.println("Hi");

System is a final Class

Modifiers:
static
final
abstract
native
volatile
synchronize
transient

primitive datatypes
boolean (default false) ------ 1 Byte ------ 8 Bits ------false
byte(0), ------ ------ ------ ------1 Byte ------8 Bits
short(0 2 bytes), ------ --------2 Bytes------16 Bits
char(u\0000), ------ ------ -----2 Bytes------16 Bits
int(0), ------ ------ ------ --------4 Bytes------32 Bits
float(0.0f), -----------------------4 Bytes-----32
long(0L), --------------------------8 Bytes------64 Bits
double(0.0d).---------------------8 Bytes------64 Bits

Six Types of Variables


Local Variable --- if you are not declared its will retrun compile error.
instance / object level variable
static / class variable
volatile variable
Final Variable
Transient Variable

blocks:
two types of blocks

Data Types
datatypes - 8
Access Specifiers - 3
Access Modifiers - 7
Exeptional Handling - 5
Iteration - 3
conditional - 7
general - 11
daily - 5
testing -
Reseverd: goto, const, assert, scriptof.

commanLine Arguments:

WRAPPER CLASS:
boolen Boolean (Boolen accepting string apart from boolen values) true, false only
boolean not 1,0
byte Byte
chart Charecter charecter acccepts (char c) rest all of are overloaded
short Short
int Integer
float Float
long Long
double Double

datatype --wraper class //autoboxing

Packages
java.lang.* - Object
java.util.* - date, Calender, scanner

boolean we can't type cast


This direction is possible for Type Casting

byte char int long Float double


Short
This direction type casting not Possible

You might also like