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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Vr Hacker](https://secure.gravatar.com/avatar/056c9fa252959c82c190767975ac719d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Vr Hacker
Courses Plus Student 40 PointsBummer: There is a compiler error. Please click on preview to view your syntax errors!
// I have setup a java.io.Console object for you named console
public class vid{
public static void main(string []args){
console console - system.abc();
string firstName = "vidyanshu";
console.printf("Hello my name is %s\n",firstName);
console.printf("%s is learning how to write java \n",firstName);
}
}
1 Answer
![jb30](https://secure.gravatar.com/avatar/681668d7cc4c5486851384a0feddda37?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
jb30
44,806 PointsIn the line console console - system.abc();
, the variable name console
is listed twice in a row, and the value of system.abc()
is subtracted from it. The variable console
has already been created for you in the challenge, but if you were to create it, it would probably be of the form Console console = System.console();
, with Console
being the class name and console
being the variable name, =
instead of -
, and a capital "S" in System
.
In Java, the class String
starts with an uppercase "S".
For the challenge, you don't need to create a class, so you can remove the first two lines and both closing } from your code.