Yeah, eclipse's auto-fix of that static error is the bane of my existence.
It's a larger problem of "oh, this random thing that I don't understand seemed to make the problem go away, let's move...
Type: Posts; User: KevinWorkman
Yeah, eclipse's auto-fix of that static error is the bane of my existence.
It's a larger problem of "oh, this random thing that I don't understand seemed to make the problem go away, let's move...
Eh, I could see putting the print statement inside the try block.
The correct thing to do is to actually handle errors. The problem at hand is: what if the user enters text instead of a digit?...
That's not at all what I'm saying. Consider this code:
public class Test{
public static void main(String... args){
String s;
boolean t = false;
if(t){
s =...
When posting code, please use the highlight tags to preserve formatting.
This looks like a job for an array.
What happens if your readline() method throws an Exception? What value should...