Jesper de Jong wrote: What is it exactly that you're having problems with?
Sorry I wasn't specific enough. So, the main problem with this program is that it is not calculating the correct average for some reason. For instance, if I enter hex number FFFF and the next number 1 also as hex, their average in decimal notation should be 32768, but I am getting some completely different value.
Jesper de Jong wrote: I don't know what the readLine method that you use in line 15 returns if you enter "blank space"
By "blank space" I mean Enter, the user doesn't enter a number or blank space, just hits Enter. When the user hits Enter button the
readLine method should "direct" the program to the
else part in
while loop.
About that
equals method, since this is my first time using it.
If I understood this right, the
equals method asks whether the object contains the same sequence of characters ? If it does, the the method sends back the result of comparison as
true or
false.
I am not really sure what this line of code does:
What does this expression returns
true or
false ?