Scanner class, anonymous objects, Random class, String class, static static class, math class tools and Arrays

A, Scanner class

1, except that the eight basic types of data, the other is a reference type;

Reference types using a three steps:

2, Scanner class

Must import the class using the reference provided by jdk, Scanner in java.util package, not in the java.lang package (String), the find jdk api, see constructor to create an object, look at the way to achieve a member function;

3, Scanner Int achieve two values ​​received in the console keyboard input summing

 4, Scanner class in comparison to identify the maximum number of three

 

Guess you like

Origin www.cnblogs.com/wmqiang/p/11259446.html