29-Feb-2014.
Java Training.
Declaring the variable:
Static : variable is defined as static it will store in static context, that is at class level.
Non Static: variable is not defined as static by default it is non static variable, this is store at
object level.
String: which store in string pool. Called as char array.
Which is immutable. which cannot be changed.
String str = “java”; -> object is created in string pool.
String str1 = “java”; -> object is not created instead str1 is referring to str object itself.
String str = “javac”;
String str2 = new String(“hello”); ->