How to use Math System tostring for API classes commonly used in Java
This article introduces the relevant knowledge of "how to use Math System tostring in API classes commonly used in Java". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Note (the class name cannot be the same as math, otherwise an error may be reported)
1.math: an interface class that can be used directly
Math.abs (- 90); returns the absolute value of the parameter
Math.max (60,098) returns the maximum value of the parameter
Math.random () * 100Random function: randomly outputs a number
Wait
Public static void main (String [] args) {int a = 1300, b = 1000; System.out.println (Math.abs (- 90)); System.out.println (Math.max (606,98)); System.out.println (Math.random () * 100); System.out.println (Math.ceil (b));}}
Results:
API of 2.System:
System.exit (0); / / the down content java code under this API will stop execution
System.currentTimeMillis (); / / returns the number of milliseconds since 1970
Public class tyue {public static void main (String [] args) {System.out.println ("go!") ; / / System.exit (0); System.out.println ("over!"); System.out.println (System.currentTimeMillis () * 1x1000, 60, 60, 24, 365 + "year"); Long begin=System.currentTimeMillis (); for (int item0, Tinci)