Results 1 to 6 of 6
Thread: Just began, need help!
- 06-28-2012, 11:53 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 5
- Rep Power
- 0
Just began, need help!
Hi guys!
So, I just starting learning Java, and ran into an error with my user input program.
Here's the code:
The error message says:PHP Code:import java.util.Scanner public class apples { public static void main(String args[]) { Scanner pie = new Scanner(System.in); System.out.println(pie.nextLine()); } }
"Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at apples.main(apples.java:4)"
Any help would be great, thanks!
-
Re: Just began, need help!
You're trying to run code that doesn't compile. The first thing to do is to never try to do this. Instead compile it, and then carefully look at the compiler errors, and fix them before running the code. You may need to look above the line that causes the compiler error to check on the semicolon that's missing.
As an aside, welcome to the java-forums.org. We're glad that you've decided to join us and we look forward to seeing your posts, both questions and answers, in the future. One suggestion: for you next question, make your question title more informative. "need help" doesn't tell us anything that we don't already know (else why would you post a question here). Instead consider this section as similar to a newspaper article's headline: a very short summation of your problem. Yours might be "Unresolved compilation problem" or something similar.Last edited by Fubarable; 06-28-2012 at 11:59 PM.
- 06-29-2012, 12:00 AM #3
Member
- Join Date
- Jun 2012
- Posts
- 5
- Rep Power
- 0
Re: Just began, need help!
Yay! Thank you, that worked perfectly. I'm new to coding, and this is my first language so...
Thanks!
-
Re: Just began, need help!
- 06-29-2012, 12:16 AM #5
Member
- Join Date
- Jun 2012
- Posts
- 5
- Rep Power
- 0
Re: Just began, need help!
Yes! I hope to make some progress!
- 06-30-2012, 11:35 AM #6
Re: Just began, need help!
Please go through the Forum Rules -- particularly the third paragraph.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Just Began: Help needed with Arrays
By Ichythus in forum New To JavaReplies: 2Last Post: 06-28-2010, 05:17 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks