Java - Classes and Objects
Consider this class:
class Counter {
int count = 0;
public void increment() {
int count = 5;
count++;
}
public int getCount() {
return count;
}
}What will getCount() return after calling increment() once?