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 trialRahul Panda
38 Pointswhy this program givin the error illegal start of expression "public class introduction"
public class Introductions { public static void main(String[] args){ Console console = System.console(); String firstName = "rahul"; console.printf("my firstname is %s\n", firstName); console.printf("%s started a project java \n",firstName); } }
public class Introductions
{
public static void main(String[] args){
Console console = System.console();
String firstName = "rahul";
console.printf("my firstname is %s\n", firstName);
console.printf("%s started a project java \n",firstName);
}
}
2 Answers
ISAIAH S
1,409 PointsHi Rahul Panda, in this Code Challenge, it looks like you don't need these lines:
public class Introductions {
public static void main(String[] args) {
Console console = System.Console();
}
}
Craig Dennis
Treehouse TeacherYeah in Java Basics, you don't need to worry about the class wrapper. It's just noise at this point of the game. Sorry for the confusion.