![]() | คำสงวน เครื่องหมายคำนวณ เปรียบเทียบ และ ตัวอักษร | ![]() |
| Format of class |
|
c:\test.java
class test {
public static void main(String args[]) {
System.out.println("a");
}
}
c:\test.java
class test {
public static void main(String args[]) {
new burin().ok();
}
}
class burin {
void ok() {
System.out.println("b");
}
}
c:\test.java
class test {
public static void main(String args[]) {
new testsub().wow();
}
}
c:\testsub.java
class testsub {
void wow() {
System.out.println("a");
}
}
| Classification | Operators |
| Arithmetic | + - * / % |
| Relational Operators | < > >= <= == != && || ! |
| Bitwise Operators | & | ^ << >> >>> - &= |= ^= |
| Assignments | = += -= /= %= |
| Bitwise Assignments | &= |= <<= >>= >>>= ^= |
| Ternary Operator (if...else shorthand) | ?: |
| Increment | ++ |
| Decrement | -- |
ตัวอย่าง
1. แบบเรียงอักษร : 49 Java Keywords abstract boolean break byte case catch char class const continue default do double else extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while assert
| 2. แบบแยกกลุ่มใหญ่ | |||
|
|
|
|
\b /* \u0008: backspace BS */ \t /* \u0009: horizontal tab HT */ \n /* \u000a: linefeed LF */ \f /* \u000c: form feed FF */ \r /* \u000d: carriage return CR */ \" /* \u0022: double quote " */ \' /* \u0027: single quote ' */ \\ /* \u005c: backslash \ */ OctalEscape /* \u0000 to \u00ff: from octal value
| Specifier | Class | Subclass | Package | World |
| private | / | . | . | . |
| protected | / | / | / | . |
| public | / | / | / | / |
| package | / | . | / | . |