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
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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, 4 months agoKeletsoM23
Most Recent 10 months, 2 weeks agocarloswork
1 year, 6 months agoDeviramu
2 years, 4 months agoshivkumarx
1 year, 8 months agobrianhuang881215
2 years, 9 months agoAmineGh
3 years, 1 month agomz0
1 year, 10 months agoiSnover
1 year, 7 months agoSSJ5
3 years, 1 month agoonyddimmav4576
3 years, 5 months agohackGh
3 years, 5 months ago