Hello all. Haven't posted much in this forum for awhile, but I don't think I'll ever leave this place as it is my main focus on a careerTo my problem; I have a jailbroken iPhone and I installed Java onto it so I can write programs on the run, which by the way is pretty awesome
Now, I have tried my best to write a simple input program using BufferedReader as Scanner was not implemented into this compiler. If it helps. I am using the Jikes compiler. Now, when I go to compile it, it compiles perfectly but, not when I go to run it, it gives me these weird errors.
This is my Java code for the program I am trying to write:
Does this look right?Code:// Input // Input information and display to screen // @Daniel Millier import java.util.*; import java.io.*; import java.lang.*; class Input{ public static void main(String args[]) throws IOException{ BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); String name; System.out.print("What is your name?"); name = read.readLine(); System.out.println("Hello, " + name); read.close(); } }
I really hope you guys can help me out. Thanks for your time![]()
EDIT: I have found the error. I had the class name "HelloWorld" and I compiled it with the name "Input". My mistake![]()
Lol, and also I recommend you to use Eclipse or Netbeans, Netbeans (which I use) is a compiler and interpreter so it is very useful.
What is it that is so good with Eclipse because I use NetBeans and I'm curious =D
Unknown, but I want to know what is so good about it to see if I should get it too![]()
IBM wrote a nice article on the exact subject, actually. It lists the differences and basics of Eclipse over Netbeans:
[Link: Migrating to Eclipse: A developer's guide to evaluating Eclipse vs. Netbeans ]
Thanks Nullw0rm!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks