I am relatively new to java, and i really don't understand some of the things going on.
A freind gave me his java exam from his first year at universtity, and said it was relatively easy, i still do not understand it, so i thought i would ask here to see what your answers were and to see if you could explain them so more, as he is not a whole lot of help. I have looked into reasearch about all the topics, tho the internet is confusing me.
Consider the class counter below:
public class Counter {
final static int MAX_VALUE = 100;
static String description = "This class creates counters";
int value;
Counter() {value = 1;}
Counter (int initialValue) {value = initialValue;}
int getCounter() {return value;}
void setCounter(Int newValue) {value = newValue}
void incrementCounter() {++value;}
void decrementCounter() {--value;}
void resetCounter() {value = 0;}
static String getDescription() {return description}
}
Identify all the members and constructors in the class COunter, grouping them as static or instance and variables or methods?