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 trialNaoh Marc
253 PointsError 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
tuukka uosukainen
22,107 PointsI 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?
Naoh Marc
253 Pointsstill not working anyway I am using eclipse from now instead of workspaces
1 Answer
tuukka uosukainen
22,107 PointsIn Eclipse I think you have to use:
System.out.print("%s can code in Java!", firstName);
Hope this helps.
Naoh Marc
253 Pointsits okay now I have just forgot to capitalized some letters thanks I will use both eclipse and workspaces. thanks
tuukka uosukainen
22,107 Pointstuukka uosukainen
22,107 PointsCould you post your source code and a link to the challenge you are having trouble with?