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

Java Java Basics Getting Started with Java Strings and Variables

i follow the video but the code console.printf dose not work at all

i got this instead treehouse:~/workspace$ java Introductions
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
treehouse:~/workspace$

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
        console.printf("hello");
  }
}

6 Answers

it still doesn't work, can you send me your whole codes plz? tks

Fahad Mutair
Fahad Mutair
10,359 Points

Remember to name your class as your file name

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
    console.printf("hello");
   }
 }

thank for your supports. but this doesnt work at all i just check on other laptop and it doesn't work as well

Fahad Mutair
Fahad Mutair
10,359 Points

Link snapshot to your workspace

how can i send you the link of my image?

Fahad Mutair
Fahad Mutair
10,359 Points

its working and i got this result

Picked up JAVA_TOOL_OPTIONS: -Xmx128m                                                                      
Picked up _JAVA_OPTIONS: -Xmx128m                                                                          
Picked up JAVA_TOOL_OPTIONS: -Xmx128m                                                                      
Picked up _JAVA_OPTIONS: -Xmx128m                                                                          
hellotreehouse:~/workspace$    // you can see the result here your hello is at the beginning of this line
Fahad Mutair
Fahad Mutair
10,359 Points

remember to save your work , then in the console type this line below

clear && javac Introductions.java && java Introductions