Java Theory Basic Learning Two

Source: Internet
Author: User
Tags bitwise

Java Development Tools

Text Editor

UltraEdit

EditPlus

notepad++

Integrated development Environment IDE Integrated development enviroment

JBuilder http://www.borland.com Basic elimination

Eclipse http://www.eclipse.org Focus

NetBeans http://java.sun.com

Java Case-sensitive

The fixed format of the Main method

public static void Main (string[] args)

{

}

A source file can correspond to multiple class files (bytecode files), that is, to write multiple classes in the source file, but only the class with the entry function is decorated with public, the class name and file name must be the same, others do not allow the two

Comments:

1.//This is a single-line comment

2./*

This is a multi-line comment

*/

The Unicode character set is used inside Java, universal

Unicode character set two characters represent one byte

Iso8859-1 Character Set one character represents one byte

Introduction to Character Sets

Basic data types

integers have binary, 8 binary, 16 binary three Ways

int a=10;

Interger.tobinarystring (a); output: 1010

Interger.tooctalstring (a); Output: 12

Interger.tohexstring (a); output: A

Floating point Type

Character type

Boolean

Naming conventions

Constant final eg:final int c=35;

Operator

~ Take counter

& bitwise with same bit 1, different bit 0

| Bitwise OR only 0 is 0, others are 1

^ Bitwise XOR or difference is 1, same as 0

such as: 8, 4 0100, 8&4=0 0000; 8|4=12 1100; ~8=7 0111;8^4= 12 1100

Java Theory Basic Learning Two

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.