Java Java Basics Getting Started with Java Strings and Variables

unable to run program

Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
ls
treehouse:~/workspace$ ls
Introductions.class Introductions.java
treehouse:~/workspace$ ls
Introductions.class Introductions.java
treehouse:~/workspace$ java Introductions
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier '%s'
at java.util.Formatter.format(Formatter.java:2519)
at java.util.Formatter.format(Formatter.java:2455)
at java.io.Console.format(Console.java:170)
at java.io.Console.printf(Console.java:209)
at Introductions.main(Introductions.java:9)

I'm in the introduction phase of java. after working for a while, the above messages are all I get.

Mekye Williams
Mekye Williams
1,874 Points

You mention concatenating your variable into a print statement can you explain what you exactly mean by that because I'm running into the same problem?

2 Answers

Micah Hack
Micah Hack
10,914 Points

Ayy Fahim, It looks like those are all error messages you are receiving in the console upon trying to run your code. Could you possibly post the code that you are working with in the work space so I might look at it and try to point you in the right direction?

Hi Micah, I've figured out actually since you mentioned it may have to do with my code. I wasn't concatenating my variable to my print statement properly. thanks for the help!