Basic program design structure of Java core technology 01:java

Source: Internet
Author: User

1. A simple Java application

 Public class Hello {        publicstaticvoid  main (string[] args) {        System.out.println ( "Hello world!" );    }}
Hello.java

2. Notes

    • Line comment: From//start to end of bank
    • Block Comment: Start with/* and end with */
    • Document comments: Start with/** to */end

3. Data type

3.1. Integral type

Byte 1 bytes -128 ~ 127
Short 2 bytes -32768 ~ 32767
Int 4 bytes -2147483648 ~ 2147483647
Long 8 bytes -9223372036854755808 ~ 9223372036854755807

3.2. Floating-point types

Float 4 bytes About ±3.40282347e+38f
Double 8 bytes About ±1.79769313486231570e+308

3.3.char type

The char type is used to represent a single character (' A ').

3.4.booelan type

A Boolean (Boolean) type has only two values: True and False.

End.

Basic program design structure of Java core technology 01: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.