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 trialAbe Daniels
Courses Plus Student 2,781 Pointserrors coming up when I am typing exactly what Craig is typing.
I am watching the "Multiple Strings" video in the Java course. I have followed exactly what Craig is doing and I am getting multiple errors.... when they shouldn't be popping up. My Code:
String name = console.readLine("Enter your name: ");
String adjective = console.readLine("Enter an adjective: ");
// String noun = console.readLine("Enter a noun: ");
// String verb = console.readLine("Enter a verb: ");
console.printf("%s is very %s", name, adjective);
It is telling me it is "expecting identifiers" and that i have "illegal start of type." I promise that in the rest of my code, I have closed brackets so it can't be that I am missing something. Not to mention it's craigs exact code.
2 Answers
Abe Daniels
Courses Plus Student 2,781 PointsI ended up figuring out that it was my fault after all. It seems like as much as we'd like to think we have the whole thing under control, there's actually an error on our part. Haha I forgot to add the "public static void main" part. :P Thank you though!
Steve Hunter
57,712 PointsCan you copy the whole file into here, please? We should be able to fix that!
Steve.
Steve Hunter
57,712 PointsGlad you got it sorted.
Steve.