File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Head First Javaexercise problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Head First Javaexercise problem" Watch "Head First Javaexercise problem" New topic
Author

Head First Javaexercise problem

Alexandra Zhang
Greenhorn

Joined: Jun 08, 2007
Posts: 16
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29249
    
139

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First Javaexercise problem
 
Similar Threads
Is there a URL that explains[ y = x++ + ++x; ] ?
Time zones program
Head First Java Exercise
Getting Last Record in Jtable
Headfirst Fullmoons exercise