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 Java Data Structures - Retired Exploring the Java Collection Framework Using ArrayLists

Example class line 16 + 17 compiler error https://w.trhou.se/begbwala5r

Ayuda lol

1 Answer

Usually when I see so many errors when compiling then I suspect it is due to } or ;

Forgetting to finish a statement or finishing one to early breaks a lot of code. The great news is when you use an IDE like NetBeans or Eclipse it will warn you ahead of time something is wrong with squiggly lines like Microsoft Word does when you misspell a word.

import java.util.Arrays;
import java.util.Date;

import com.teamtreehouse.Treet;
import com.teamtreehouse.Treets;


public class Example {

  public static void main(String[] args) {
    Treet[] treets = Treets.load();
    System.out.printf("There are %d treets. %n",
                     treets.length);
  } // <-------------you prematurely placed this curly brace cutting off the rest of  your code
  Treet originalTreet = treets[0];
  System.out.println("Hashtags:");
  for (String hastag : originalTreet.getHashTags()){ // <--------you misspelled "hashtag"
    System.out.println(hashtag);
  }
}
// <------------insert the { here to close off the class Example