File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How can I get the source code for java.Math class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How can I get the source code for java.Math class?" Watch "How can I get the source code for java.Math class?" New topic
Author

How can I get the source code for java.Math class?

Neha Gap
Greenhorn

Joined: May 30, 2007
Posts: 29
Hi folks,

The subject says it all.

Any help would be appreciated.

Thanks,
Neha.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18109
    
    8

If you have downloaded a Java JDK, you will find a file named "src.zip" in the directory where you installed it. You'll find all of the source code for the Java API in there, all 5000-odd classes.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

The source of java.lang.Math won't help you out much though. Most methods delegate to a similar method in class java.lang.StrictMath, and most of that class' methods are native.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36452
    
  15
But there is a link in the java.lang.StrictMath javadoc to a file where all the algorithms are written.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I get the source code for java.Math class?