Sunday, February 22, 2009

simple example to show the static variables

// example to declaration the static variables

package variables;

class Student {
String name;
int rollno;
static String collname;
public static void main(String arg[]) {
Student s1=new Student();
System.out.println(; // null
System.out.println(collname); // null (here with out useing object get collname)


Post a Comment