Summary of Java Fundamentals (i)

Source: Internet
Author: User

Le Orange Valley Java Summary-java Introduction

(1) Java architecture: j2se,javaweb,j2ee

(2) java features: platform-independent (virtual machine), garbage collection (makes java more Stable)

(3) JDK and Jre,jdk:java development environment, Jre:java Operating environment

(4) First Java program: Helloworld,java's entry is main (public static void main (string[] ARGS))

(5) Java Program Development steps:. Java compilation (javac) into A. Class run (java). class file

Happy Orange Valley Java Summary-basic data types

Marker: the place where you can take a name is called a marker

Rules for Markers:

1, can only be letters, numbers, underscores, $; cannot start with a number; strictly case-sensitive; cannot use keywords as markers

2, keyword: keywords are all lowercase

3, constants: such as 123, "hello"

*也可以使用final定义常量(请参照Math.PI),如public static final int SLOW_SPEED=1;

4, variable: The essence of a variable is a small area in memory that holds the data in this area

*变量申明:类型变量名字*变量必须先声明,再赋值,再使用*注意区分基本数据类型的变量与引用数据类型的变量*变量的作用域,局部变量与成员变量:变量在哪个大括号里定义,就在哪里有效,出了大括号无效

5, Basic Data type: Java data types fall into two main categories: basic data types, Reference data types

* Basic data types are divided into4Class8boolean,char,byte,short,int ,long,float double*boolean type only Span class= "kwd" >true,false* char is unicode coded *float,double Be accurate (not absolutely Exact)                

6, conversions between basic data types

*123Literal constants areIntType12.3Literal constants areDoubleType8888888888888This literal constant has a problem (because it has exceededIntThe scope of the change to8888888888888L)*BooleanIncompatible with other types*Byte,Short,charint * The small-capacity data type can be automatically converted to a high-capacity data type: byte< Span class= "pun" >,short,char-->int-->long-->float< Span class= "pun" >-->double* Bulk conversion to small capacity data type for casting * A variety of data types to perform operations, first convert to the largest data type and then perform operations, the type of the entire expression is the largest data type * must master the exercises on ppt 
article goto: le Orange Valley Guild http://www.lechenggu.com/ BBS/TOPIC/57EB4513FA0F9D733C1799DF

Summary of Java Basics (i)

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.