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
jack Sandberg
1,659 PointsThe console gives the same output every time .. even though i save the code..
What am I doing wrong here? Only the "hello my name is jack " is shown in the console, nothing else .. why?
import java.io.Console;
public class Introductions {
public static void main(String[] args) {
Console console = System.console();
// Welcome to the Introductions program! Your code goes below here
String firstName="jack";
//this is an example of CamelCasing
console.printf("hello my name is jack %s\n", firstName);
console.printf("%s is learning how to write java\n",firstName);
}
}
Tarvinder Kalra
4,081 PointsHi Jack
If you have added second console statement later , have you recompiled the file again after saving it?
Grigorij Schleifer
10,365 PointsGrigorij Schleifer
10,365 PointsHi jack,
If I look the output should be :
Try to reload page