Basic Java Research

Source: Internet
Author: User

This chapter has learned several goals to master Java several annotations know the difference between JDK,JRE master Java several data types, know about the range of Java keywords and escape characters Java Value Conversion 1.java several comments     There are three types of annotations in Java
    • Line Comment
    • Block annotations
    • Document comments
Example: Packagecom. Notes;/*** There are three types of annotations in Java* Line Comment* Block Comment* Documentation Comments* Note examples * *@author like* Here is the document comment */ PublicclassNotesexample{     /** Block Comment      */      PublicStaticvoid Main(String[]args){          //Here is the line comment     }}
2. Know the difference of JDK,JRE see: The difference between "Java Essentials" JDK and JRE 3. Master Java data types, know the approximate range
Serial number Data type Default value Size/bit Range
1 BYTE (bit) 0 8 -128-127
2 Short 0 16 -32768-32767
3 Int 0 32 2.1 billion
4 Float 0.0f 32 ..
5 Double 0.0d 64 ..
6 Long 0L 64 ..
7 Char \u0000 (empty) 2 0-255
4.java keyword 4.1java escape character 5. Automatic conversion of numeric conversions
Description: No precision lost, dashed line may be lost! 5.1 cast int can go double, that double to int?
    • This requires a double D = 2 to be cast;
    • int i = (int) d;

2015, I hope I can break through their own, refueling! .




Basic Java Research

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.