Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Java General Java Using the Math class Tutorial

The Math class is final and all the methods defined in the Math class are static, which means you cannot inherit from the Math class and override these methods.

Tutorial Details:

Using the Math class

The Math class is final and all the methods defined in the Math class are static , which means you cannot inherit from the Math class and override these methods. Also, the Math class has a private constructor, so you cannot instantiate it.

The Math class has the following methods: ceil() , floor() , max() , min() , random() , abs() , round() , sin() , cos() , tan() , and sqrt().

The ceil() method returns the smallest double value that is not less than the argument and is equal to a mathematical integer.

The floor() method returns the largest double value that is not greater than the argument and is equal to a mathematical integer.

The max() method takes two numeric arguments and returns the greater of the two. It is overloaded for int , long , float , or double arguments.

The min method takes two numeric arguments and returns the smaller of the two. It is overloaded for int , long , float , or double arguments.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Java General Java Using the Math class Tutorial

View Tutorial:
Java General Java Using the Math class Tutorial

Related Tutorials:

Java Q&A - Java Still Open
Java Q&A - Java Still Open
 
Printing in Java, Part 3 - JavaWorld January 2001
Printing in Java, Part 3 - JavaWorld January 2001
 
Printing in Java, Part 4 - JavaWorld February 2001
Printing in Java, Part 4 - JavaWorld February 2001
 
Java scripting languages: Which is right for you?
Java scripting languages: Which is right for you?
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
Excellent tutorial on Struts and Tiles
Excellent tutorial on Struts and Tiles This tutorial assumes knowledge of Java, JDBC, Servlets, J2EE (with regards to Web applications) and JSP Struts in a holistic manner, minus the beads and crystals. The Tiles framework makes creating reusable pages
 
Impressive !
Impressive !
 
JEP - Java Mathematical Expression Parser
JEP - Java Mathematical Expression Parser JEP is a Java API for parsing and evaluating mathematical expressions. With this library you can allow your users to enter an arbitrary formula as a string, and instantly evaluate it. JEP supports user defined
 
Tools and Libraries for the Advancement of Sciences (was: J.A.D.E.)
Tools and Libraries for the Advancement of Sciences (was: J.A.D.E.) Our Vision To provide the most comprehensive Java TM library for the scientific community. To create synergy between all sciences (e.g. math, physics, sociology, biology, astron
 
JFormula 2.9 - Math expression API
JFormula 2.9 - Math expression API JFormula is a Java library for evaluating various expressions (boolean, math, if/then/else...). A lot of companies chose JFormula like EADS Space Transportation.
 
Commons-Math: The Jakarta Mathematics Library
Commons-Math: The Jakarta Mathematics Library The Java programming language and the math extensions in Commons Lang provide implementations for only the most basic mathematical algorithms. Routine development tasks such as computing basic statistics or s
 
Java Servlets: Design Issues
This article covers the principal concepts associated with servlets. This article examines some of the design issues, and offers some guidelines on the applicability of Java servlets for web based application development.
 
Servlet Essentials
This document explains the concepts of Java Servlets and provides a step-by-step tutorial for writing HTTP Servlets with complete source code for the example Servlets. The tutorial and the other chapters cover all facets of Servlet programming from a ...
 
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack
 
JavaServer Pages Technology - Documentation
Sun's tutorial for Java Server Pages that provide a good introduction to design web pages with JSP.
 
Understanding Network Class Loaders Class loaders
One of the cornerstones of Java dynamics, determine when and how classes can be added to a running Java environment.
 
JavaRSS.com 2004: Review of the Year
A look back at the major events of 2004 in Java.
 
Introduction To Enterprise Java Bean(EJB). WebLogic 6.0 Tutorial.
Introduction To Enterprise Java Bean(EJB). WebLogic 6.0 Tutorial. Welcome to EJB Section (Learn to Develop World Class Applications with Enterprise Java Beans) (Online WebLogic 6.0 Tutorial) Introduction To Enterprise Java Bean(EJB) Enterprise
 
Building Search Engine Applications Using Servlets !
Building Search Engine Applications Using Servlets ! Building Search Engine Applications Using Servlets Please visit http://www.webappcabaret.com/javadevelopers/search to see running copy of our search engine. Introduction This tutorial takes
 
Beginner to advance guide to the Apache Struts
Beginner to advance guide to the Apache Struts The Complete Apache Struts Tutorial This complete reference of Jakarta Struts shows you how to develop Struts applications using ant and deploy on the JBoss Application Server. Ant script is provided
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.