Hi i am not getting what you exactly asking but you can refer the below example for class type variable and try to enter your complete code for output
public class Test
{
public void Age()
{
int age = 0
age = age + 7
System.out.print"Puppy age is : " + age)
}
public static void main(String args[]){
Test test = new Test()
Test.Age()
}
}
Jul 26, 2012