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 Review: Introduction to Your tools

Error could not find or load main class Introduction.java

I have got this error on this source code from lessons 2 string on java basics.

import java.io.Console;

public class Introductions {

public static void main(String[] args){

Console console = System.console();

String firstName = "Graig";

console.printf("his name is %s, firstname");

} }

// it is not working

Could you post your source code and a link to the challenge you are having trouble with?

I solved the challenges with this simple code:

String firstName = "Tuukka";

console.printf("%s can code in Java!", firstName);

You have to take the firstName variable name outside of quotation marks.

Hope this helps?

still not working anyway I am using eclipse from now instead of workspaces

1 Answer

In Eclipse I think you have to use:

System.out.print("%s can code in Java!", firstName);

Hope this helps.

its okay now I have just forgot to capitalized some letters thanks I will use both eclipse and workspaces. thanks