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 trialAde Aulya
174 PointsJavaTester.java:74: error: illegal start of expression public class Introductions
i have followed the instruction but still got error. this is my first time learn language program. could you tell me what should i do first ?
// I have setup a java.io.Console object for you named console
public class Introductions {
public static void main (String[] args){
Console console = System.console();
//this is introduction program!
String firstName = "Ade";
//thisIsCamelCasing
console.printf("Hello, my name is Ade \n", firstName);
console.printf("Ade is learning Java Language Program \n", firstName);
}
}
3 Answers
Olha Markova
2,050 PointsMake sure, that you write all the words without mistakes and don´t forget semikolons etc. If you used copy/paste it can also lead to the error. Try to delate your code and type it again
Olha Markova
2,050 PointsHi Ade! Your Problem is, that you forgot to use "%s" instead of "Ade" in both lines console.printf. It means, that you have stored your name ("Ade") in variable firstName, that is why you don´t actually need to type it again istead of it you use "%s". Here is the code:
public class name {
// I have setup a java.io.Console object for you named console
public static void main (String[] args){
//this is introduction program!
String firstName = "Ade";
//thisIsCamelCasing
System.out.printf("Hello, my name is %s \n", firstName);
System.out.printf("%s is learning Java Language Program \n", firstName);
}
}
Yousef Gamal
Android Development Techdegree Student 174 PointsYou don't need to create class, Just enter your statement, your code Directly
Joseph Boro
Courses Plus Student 51 PointsJoseph Boro
Courses Plus Student 51 PointsStill having the same error message