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 trialroshaan zafar
3,868 Pointson my console in my workspace it always printout that "my name is craig" despite i have changed my code
what might be the problem
5 Answers
Steve Hunter
57,712 PointsHi there,
Have you saved & recompiled your Workspace?
Steve.
roshaan zafar
3,868 Pointsi have taken snapshot how should i share here
Steve Hunter
57,712 PointsThe snapshot gives you a link in the new window (its URL) - paste that in here. That lets me see your code but not amend it. I can then fork the Workspace to amend it.
Steve.
roshaan zafar
3,868 Pointsroshaan zafar
3,868 PointsSteve Hunter
57,712 PointsHi Roshaan,
I think your compiling should fail so your runtime/compiled code won't be changed until the compile is successful. It will fail because String
needs a capital letter.
Change that and the compile should happen which will amend/update your runtime/compiled code.
Steve.
Steve Hunter
57,712 Pointspublic class Introductions {
public static void main(String[] args) {
Console console = System.console();
string firstname="roshaan"; // <- that won't compile
console.printf("Hello, my name is %s\n",firstname);
console.printf("%s is am learning java\n",firstname);
}
}
roshaan zafar
3,868 Pointsyeah thanks steve
Steve Hunter
57,712 PointsNo problem!
roshaan zafar
3,868 Pointsroshaan zafar
3,868 PointsI did several times I wonder whats wrong
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsStrange - can you share your Workspace so I can fork it and see what might be the problem. (click the "camera" top-right)
Steve.