Common package types for JAVA7JDK

Source: Internet
Author: User

Java Scanner class

Java 5 Adds the Java.util.Scanner class, which is a new utility for scanning input text. It is a combination of the previous StringTokenizer and Matcher classes. Because any data must be retrieved through a capturing group of the same pattern or by using a draw to retrieve parts of the text. You can then use a combination of regular expressions and methods to retrieve specific types of data items from the input stream. In this way, in addition to the ability to use regular expressions, the scanner class can optionally parse data for strings and basic types such as int and double. With scanner, you can write a custom parser for any text content you want to work with.

Java number and Math class

  1. Generally, when you need to use numbers, we usually use built-in data types, such as: Byte, int, long, double, and so on.

  2. However, in the actual development process, we often encounter situations where objects need to be used rather than built-in data types.

  3. To solve this problem, the Java language provides a corresponding wrapper class for each built-in data type, such as.

  4. All wrapper classes are subclasses of abstract class number.

Numbers:byte Double Float Long Integer Short

Math: The Math object is a collection of the methods that JS provides to us for operations.

Common package types for JAVA7JDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.