Question: public class Test { public static void main ( String [ ] args ) { T t 1 = new T ( ) ; T

public class Test {
public static void main(String[] args){
T t1= new T();
T t2= new T();
System.out.println("t1's i ="+
t1.i +" and j ="+ t1.j);
System.out.println("t2's i ="+
t2.i +" and j ="+ t2.j);
}
}
class T {
static int i =0;
int j =0;
T(){
i++;
j =1;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!