Register FAQ Calendar Search Today's Posts Mark Forums Read

Go Back   Java Programming Forums > Java Programming > New to Java

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-10-2008, 02:43 AM
Junior Member
 
Join Date: Sep 2008
Posts: 11
rosh72851 is on a distinguished road
Default java.util.UnknownFormatConversionException error

Why do I get this error?
Code:

Java Code:
 
Exception in thread "main" java.util.UnknownFormatConversionException: Conversio n = '5' at java.util.Formatter.checkText
 
(Formatter.java:2502) at java.util.Formatter.parse(Formatter.java:2484) at java.util.Formatter.format(Formatter.java:2413) at 
 
java.io.PrintStream.format(PrintStream.java:920) at java.io.PrintStream.printf(PrintStream.java:821) at Maclaurin1.main(Maclaurin1.java:55) 
 
Press any key to continue . . .
All I want to do is convert a number from degrees to radians (Math.toRadians())and find the Math.sin and Math.cos of it
Reply With Quote
  #2 (permalink)  
Old 08-10-2008, 03:34 AM
Junior Member
 
Join Date: May 2008
Location: Canada
Posts: 8
danielstoner is on a distinguished road
Default Re: java.util.UnknownFormatConversionException error

Post the code that trows the exception. It seems you use a printf call and the format you are passing is invalid (formats are in the form %something). If you post the code excerpt somebody might point you to the wrong format.
__________________
Daniel @ [www.littletutorials.com]
Language is froth on the surface of thought
Reply With Quote
  #3 (permalink)  
Old 08-10-2008, 04:01 PM
Junior Member
 
Join Date: Sep 2008
Posts: 11
rosh72851 is on a distinguished road
Default Re: java.util.UnknownFormatConversionException error

Heres a snippet of the code:
Java Code:
 	public static void main(String[] args)
 	{
		double x;
		x = (Math.PI)/4;
                double  rad=0;
		double result=0;
		System.out.printf("Evaluate x = %1.0f",x);
		result = sine_evaluate(x);
		System.out.printf("%nSin Result = %5.15f",result);
		result = cos_evaluate(x);
		System.out.printf("%nCos Result = %5.15f%n",result);
		rad=Math.toRadians(x);
                result = Math.sin(rad);
               System.out.printf("%nActual Sine Result = %5.15f%n",result); 
               result = Math.cos(rad);
               System.out.printf("%nActual Cos Result = %5.15f%n",result);
            
	}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Custom Search
100 most searched terms
Search Cloud
"bad endpoint type" com.sun.xml.internal.messaging.saaj.soapexceptionimpl com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad endpoint type com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed convert arraylist to map date_format_now eclipse shortcut keys ejb3 quartz java convert double to binary java forum java forums java jtextarea bold java jtextarea color java jtextarea font java jtextarea font size java programmer forum java programmers forum java programming forum java programming forums java read last line java read last line of file java sendkeys java.security.privilegedactionexception java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad response java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed javapf javaprogrammingforums jtextarea bold jtextarea font jtextarea font color jtextarea font size programing forums programming forums reset jcombobox saaj0008 saaj0008: bad response; bad request saaj0008: bad response; not found severe: saaj0008 severe: saaj0008: bad response; bad request severe: saaj0008: bad response; not found soap java.security.privilegedactionexception soapexceptionimpl: bad endpoint type textpad java

All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.