Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSchwartz Prince
Courses Plus Student 2,132 PointsPlease help me....
I tried running the program and I got this error. Dont know where I went wrong. This is the response I got in the IDEA. Please help
Information:java: Errors occurred while compiling module 'Messy' Information:javac 1.8.0_121 was used to compile java sources Information:11/04/17, 9:34 PM - Compilation completed with 1 error and 0 warnings in 1s 446ms /Users/schwartz/IdeaProjects/Messy/src/com/myfirstproject/Main.java Error:(5, 8) java: class Messy is public, should be declared in a file named Messy.java
import java.util.*;
public class Messy {
public static void main(String[] args){
System.out.println("five");System.out.println("one");
System.out.println("six");
System.out.println( "four" ); System.out.println("two");
Please comment out this line and
this line as well with a hotkey that does multi-line commenting
List<String> numberWords = Arrays.asList("six", "seven", "eight", "nine");
for (String numberWord: numberWords) {
// Use the sout shortcut to write out numberWord;
}
}}
1 Answer
Daniel Vigil
26,473 PointsThe instructions to the challenge are :
Oh yuck this file is so Messy. Can you please start a new IDEA project. Do not use a Template. Create a new new file named Messy, right off of the source code root (src ) folder. Copy and paste the code from the challenge into your new file.
In your IDEA project, did you add the code into a file called Messy.java?
Chance Edward
4,507 PointsChance Edward
4,507 PointsHow do you do that though.