I'm currently reading Java A Beginners Guide and in certain points of the book there is a piece of code that confuses me but I can't find an explanation of what it does.
int a;
int b;
a = b = 0; //This is the line I don't understand.
What I do understand is that the value of 0 is copied into b and then b is copied into a but I don't understand what the point of this would be. Another example would be:
Queue(int size) {
char q[];
putloc = getloc = 0;
}
My question is, what is the point of this piece of code if you're trying to create a first in first out queue or line using an array?