1 / 1371
文档名称:

Liang - Introduction To Java Programming, 8th Ed. (pg.1371), Prentice Hall, 2011.pdf

格式:pdf   页数:1,371
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Liang - Introduction To Java Programming, 8th Ed. (pg.1371), Prentice Hall, 2011.pdf

上传人:bolee65 2014/4/18 文件大小:0 KB

下载得到文件列表

Liang - Introduction To Java Programming, 8th Ed. (pg.1371), Prentice Hall, 2011.pdf

文档介绍

文档介绍:Java Quick Reference
Console Input GUI Input Dialog
Scanner input = new Scanner(); String string = (
int intValue = (); "Enter input");
long longValue = (); int intValue = (string);
double doubleValue = (); double doubleValue =
float floatValue = (); (string);
String string = ();
Message Dialog
Console Output
(null,
(anyValue); "Enter input");
Primitive Data Types Arithmetic Operators Assignment Operators
byte 8 bits + addition = assignment
short 16 bits - subtraction += addition assignment
int 32 bits * multiplication -= subtraction assignment
long 64 bits / division *= multiplication assignment
float 32 bits % remainder /= division assignment
double 64 bits ++var preincrement %= remainder assignment
char 16 bits --var predecrement
boolean true/false var++ postincrement
var-- postdecrement
Relational Operators Logical Operators if Statements
< less than && short circuit AND if (condition) {
<= less than or equal to || short circuit OR statements;
> greater than ! NOT }
>= greater than or equal to ^ exclusive OR
== equal to if (condition) {
!= not equal statements;
}
else {
switch Statements loop Statements statements;
}
switch (intExpression) { while (condition) {
case value1: statements; if (condition1) {
statements; } statements;
break; }
... do { else if (condition2) {
case valuen: statements; statements;
statements; } while (condition); }
break; else {
default: for (init; condition; statements;
statements; adjustment) { }
} statements;
}
Companion Web site: ng
Java Quick Reference
Frequently Used Static Constants/Methods Array/Length/Initializer
int[] list = new int[10];
() ;
(a, b) int[] list = {1, 2, 3, 4};
()
(anyValue) Mul