Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

valueOf method()

 
Sahil Kapoor
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can anyone tell how this statement is getting executed ???

Infact there is no such Static Method valueOf in Double class which takes double as an argument. It has the one with String.

Thanks !!!
 
Ireneusz Kordal
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sahil Rally wrote:
Infact there is no such Static Method valueOf in Double class which takes double as an argument. It has the one with String.

Look here:
http://java.sun.com/javase/6/docs/api/java/lang/Double.html#valueOf%28double%29

Probably you read wrong API documentation, in Java 1.2 & 1.4 Double had only one valueOf(String) method,
but starting from Java 5 Double class has two valueOf methods.
When you use google to find API docs, always add "Java 6" as keyword.
 
Sahil Kapoor
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Ireneusz Kordal !!

You are right i was checking wrong API !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic