JAVA v19-01-31
Type | Size | Range | Default | Class & Field |
---|---|---|---|---|
byte | 8 bit | -2^7 to 2^7 -1 | 0 | |
short | 16 bit | -2^15 to 2^15 -1 | 0 | |
int | 32-bit | -2^31 to 2^31 -1 | 0 | Integer.MIN_VALUE to Integer.MAX_VALUE |
long | 64 bit | -2^63 to 2^63-1 | 0L | |
float | 32 bit | -3.4E38 to 3.4E38 | 0f | |
double | 64 bit | -1.7E308 to 1.7E308 | 0d | |
char | 16 bit | '\u0000' to '\uffff' (0 to 65,565) | '\u0000' | |
boolean | 1 bit | false |
Arithmetic + - * / & ++ --
Relational == != > < >= <=
Bitwise & | ^ ~ << >> >>>
Logical && || !
Assignment = += -= *= /= %= <<= >>= &= ^= |=
Miscellaneous ?: instanceof
Class Package Subclass World
private ok - - -
default ok ok - -
protected ok ok ok -
public ok ok ok ok
$ java -version; javac -version
# apt-get install default-jdk default-jdk-doc
# apt-get install openjdk-11-jdk openjdk-11-doc
# update-java-alternatives -l
# update-java-alternatives -s java-1.11.0-openjdk-amd64
# update-alternatives --display java
# update-alternatives --config java
$ screen vim ~/java/Main.java
$ ( cd ~/java/; vim Main.java )
tutorialspoint.com/java/index.htm
chortle.ccsu.edu/java5/index.html
oreilly.com/openbook/javawt/book/index.html
• White Paper : oracle.com/technetwork/java/langenv-140151.html
• Getting Started : docs.oracle.com/javase/tutorial/getStarted/index.html
• Language Basics : docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html
• Object-Oriented Programming Concepts : docs.oracle.com/javase/tutorial/java/concepts/index.html
• Classes and Objects : docs.oracle.com/javase/tutorial/java/javaOO/index.html
• Interfaces and Inheritance : docs.oracle.com/javase/tutorial/java/IandI/index.html
• Numbers and Strings : docs.oracle.com/javase/tutorial/java/data/index.html
• Packages : docs.oracle.com/javase/tutorial/java/package/index.html
• Exceptions : docs.oracle.com/javase/tutorial/essential/exceptions/index.html
• Basic I/O : docs.oracle.com/javase/tutorial/essential/io/index.html
• Concurrency : docs.oracle.com/javase/tutorial/essential/concurrency/index.html
• Generics : docs.oracle.com/javase/tutorial/java/generics/index.html
• Annotations : docs.oracle.com/javase/tutorial/java/annotations/index.html
• Swing : tutorialspoint.com/swing/index.htm