Monday 22 February 2016

Java Tutorial : Java Math class (Random method)


Click here to watch in Youtube :
https://www.youtube.com/watch?v=LfIhZXCz2QY&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial : Java Math class (Random method) 
Java Tutorial : Java Math class (Random method) 
MathDemo.java
public class MathDemo
{

    public static void main(String[] args)
    {
        double value = Math.random();
        System.out.println(value);

        int number = (int) (Math.random() * 10);
        System.out.println(number);

    }
}
Output
0.9560288821277895
0
Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/MathDemo_Random_App.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/MathDemo_Random_App

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/d0559102086f9677d57877fbba43556aca45fc19/BasicJava/MathDemo_Random_App/?at=master

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment