Chengmai NIIT 3 days before Android training review Java Basics

Source: Internet
Author: User

It belongs to the leak check.

Java source files are compiled to generate a class file/bytecode file to help you achieve a truly cross-platform. A class is compiled into a class file. The execution is then interpreted through the JVM (the Java Virtual machine).

Java of 8 a basic data type :

Four integer types: Byte (1 bytes different and range different 2^7~2^7), short (2), int (4), Long (8)

Two floating-point types: Float (4), double (8)

Boolean type: Boolean (1)

Character type: char (2)

Java Specification

* Multiple classes can be defined in a Java file, but only one class is exposed and must be the same as the public class name

* If there is more than one class in a file, how to define the file name: if the non-public class, the file name randomly

Public, publicly, class members are completely public, stating that any class can access the member

Protected, protected, other classes in the same package can be accessed, and only subclasses in different packages can access

Default, the other class in the same package is accessible to the member, and the no-access specifier is the default

Private, privately owned, that class is private, and can only be accessed by that class

Interface ( Interface ) :

The variables in the interface are all static final

The methods in the interface are all public abstract

Chengmai NIIT 3 days before Android training review Java Basics

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.