First knowledge of Java

Source: Internet
Author: User

Java basic data type: cannot =null;

Four types of eight categories:

1. Integer type

Byte 2 of Eight square (256)-127-128 in memory accounting for 1 bytes

Short 2 of 16 square memory 2 bytes

int 2 of the 32-square-memory account 4 bytes

A long 2 of the 64-time memory occupies 8 bytes

2. Floating-point type

Float-----------Valid Digital 7-bit (single-precision floating-point type) 4 bytes in memory

Double--------valid digit 16-bit (double) memory occupies 8 bytes

3. Boolean type

Boolean (only another value, True,false) accounts for 1 bytes in memory

4. Character type

char (single quote) 2 bytes in memory

Identifier:

Any place that needs your name is called an identifier.

Java programming is strictly case-sensitive

The name of the identifier cannot be duplicated with the keyword

Reserved words: Goto CONST

Rules:

Identifiers are alphabetic (case), _, $, and cannot start with a number
Code specification: Hump Naming method
String EmpName
getElementById

First knowledge of 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.