Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Head First Javaexercise problem  RSS feed

 
Alexandra Zhang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got a problem with my exericese of Head First Java.

My code is :

It compiles fine, but won't output.

The error message is:

Exception in thread "main" java.lang.NoSuchMethodError: method java.lang.String.format with signature (Ljava.lang.String;[Ljava.lang.Object;) Ljava.lang.String; was not found.
at FullMoons.main(FullMoons.java:14)

My operating system is Ubontu Linux, and java version is 5.

Please help me with it.

Edit by mw: Added Code Tags and disabled smilies.
[ July 09, 2007: Message edited by: marc weber ]
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yanli,
Welcome to JavaRanch!

Have you tried typing "javac -version" to make sure the version of Java being used is the same as the one you expect? It's possible an older version of Java is getting in the path first.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!