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 trial

Java Local Development Environments Exploring Your IDE Clean up this mess

Cannot access Messay error

Greetings, Im doing the java local-development envrionment lab and running into what should be a seemingly easy challenge: Cut and paste the code from my ide into the compiler and generate the results.

I am getting the following error:

JavaTester.java:104: error: cannot access Messy This is my code

package com.teamtreehouse;

import java.util.Set;
import java.util.TreeSet;

public class Main {

    public static void main(String[] args) {
        System.out.printf("This is the classpath:  %s %n",
        Set<String> propNames = new TreeSet<String>(System.getProperties().stringPropertyNames());
        for (String propertyName : propNames) {
            System.out.printf("%s is %s %n",


and this is the link to the challenge.

Can somebody help clean this up for me?

Thanks Chris

package com.treehouse;

import java.util.*;
public class Messy {
    public static void main(String[] args) {
        List<String> numberWords = Arrays.asList("six", "seven", "eight", "nine");
        for (String numberWord : numberWords) {
            // Use the sout shortcut to write out numberWord;

1 Answer

Jordan Powell
Jordan Powell
Courses Plus Student 5,410 Points

To clean up the messy. Java just change the strings in the println messages to correspond with the correct order. One,two, three, etc.