Java Basic Data

Source: Internet
Author: User
Tags logical operators

Data type:

Integer type:
Long------2 of the 64-time Square
int-------2 of the 32-time Square
Short-----2 of the 16-time Square
BYTE------2 of 8 square
Floating point type:
Float-----up to 7 decimal digits with a total number of 8 digits
Double----number of decimal digits up to 15 bits, holding the total number of digits is 16 bits
Logic type:
Boolean---not true or false
Character type:
char------one character (position in ASCII code)

Comments

variables, constants, assignments, operators, expressions

Variable: An abstract concept that represents a value

Assignment operator =

Assign value
Variable's type variable name = variable value;

Assignment of variables:---> "="
Data type variable name assignment operator variable value
String name = "Zhao Benshan";

Numeric, Boolean type can be written directly
Characters (char type) can only be enclosed in single quotes
String: Multiple char strings together---double quotes

Binary operators: + (plus sign)-(minus sign) * (multiplication sign)/(division sign)% (remainder)
Plus and minus signs can also be used to indicate positive negative numbers
+= -= *= /=

Unary operators: + +--

Relational operators:
= = > < >= <=! =
Logical operators:
& && | | | ! ^ (XOR operation: Turn into binary (short number of bits with 0 to complement), same as 0, different 1)
Three-dimensional expression:
Boolean value 1: Value 2;

Constant:
Modifier: Final

Java Basic Data

Related Article

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.