Data types for Java

Source: Internet
Author: User

Java provides eight basic data types, including: Byte,short,int, Long,char,float,double,boolean. It is important to note that a string is a class, which is a reference type.

Learning data types, mainly figuring out the number of bytes per data type, how to define and what to store.

Learning programming requires constant programming exercises, which are focused on the definition and output of each data type, and the operations are described later.

One thing to add is the identifier used in Java (the name of the data type you define: An int a;a is an identifier). Java is case-sensitive, and the definition of an identifier is: must be underlined, the letter or dollar character $ beginning, followed by the character, not limited to 26 English characters, other language character can also.

Keywords: (that is, Java's own language, the use of a notation, or a special identifier) the Java language inside the keywords are lowercase.

Note: The identifiers you define cannot be the same as the keywords.

Reserved word: Java is not used now, may be used in the future keywords.

Learning this piece, you have to look at the concept, or the back of the inability to get started.

Today write less, is generally a direction, the same knowledge in the garden, speak a lot of good, I started from the other side to speak, mainly to provide a direction, let the reader know what kind of state. Need to master, you can go to the garden to see the greater God write more detailed knowledge points.

Data types for Java

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.