Answer is B.
To test:
public class Test {
static int count = 0;
int i = 0;
public void changeCount() {
while(i<5) {
i++;
count++;
}
}
public static void main (String [] args) {
Test check1 = new Test ();
Test check2 = new Test ();
check1.changeCount();
check2.changeCount();
System.out.print(check1.count + " : " + check2.count);
}
}
public class count {
static int count =0;
int i =0;
public void changeAccount() {
while(i<5) {
i++;
count++;
}
}
public static void main(String args[]) {
count c1= new count();
count c2 = new count();
c1.changeAccount();
c2.changeAccount();
System.out.println(c1.i + ":"+c2.count );
}
}
Ansewer is c : 5:10
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
v323rs
Highly Voted 4 years agoKeletsoM23
Most Recent 7 months agocarloswork
1 year, 3 months agoDeviramu
2 years, 1 month agoshivkumarx
1 year, 4 months agobrianhuang881215
2 years, 5 months agoAmineGh
2 years, 10 months agomz0
1 year, 6 months agoiSnover
1 year, 4 months agoSSJ5
2 years, 10 months agoonyddimmav4576
3 years, 1 month agohackGh
3 years, 2 months ago