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 trialchris okorie
197 Pointscould someone see whats wrong with my code and give me advice on how to take notes
i cant seem to get it right i think it where i placed the qoation mark
// I have setup a java.io.Console object for you named console
String firstName = "christopher";
console.printf( firstName + "can code in Java");
1 Answer
rydavim
18,814 PointsYou have the coding and syntax down, nice job! When doing challenges it's important to pay very close attention to the output you need to generate. Since the challenges are being checked automatically, even minor errors will cause it to not pass.
It looks like you were on the third task, rather than the second. Stand by for an update. Done! (Sep 26)
You should get an error on the third task about using %s
in your printf
statement. Java is not a language I know particularly well, but this webpage seems like a decent reference on that. I've included some pseudo-code below to get you started.
String firstName = "christopher";
// console.printf("string here with % formatting", string format variables here);
Taking notes on programming topics can be a bit tricky, since syntax is so important and can be tedious to write down. As a general rule, I like to keep practice file(s) going where I save examples of important things I've learned. Remember that including extra comment lines explaining to yourself what the program is supposed to be doing at that point will help you when you need to refer to them later.
If you prefer to take notes in a text editor, I would encourage you to use one that supports some type of markdown for code blocks - especially one with language-specific coloring. I haven't used it personally, but I've heard good things about Typora. You can see an example of Treehouse markdown below.
// java
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
# python
print("Hello, world!")
// javascript
alert("Hello, world!");
Let me know if you're still having trouble or if you have any follow up questions on either topic. Good luck, and happy coding!
chris okorie
197 Pointschris okorie
197 Pointswhat about for taking notes in a notebook