Monday, January 23, 2012

static variable

/*
static most powerful and beautiful concept  in java .if use static, jvm will load at the time of class load.
 if we use static for a variable it treated as class level variable for every new object will not create new variable existing only used.
*/

public class Static_Variable
{
static String collegename="ghandi college";
public void method1()
{
//incomplete
}
}