Download from http://www.bluej.org/ Make sure JDK is installed Follow the installation instruction Download the BlueJ Tutorial
Source code: HelloWorld.java Compile: javac HelloWorld.java Run: java HelloWorld Using BlueJ
| Datatype | Meaning | Size in Bytes | Min Value | Max Value | Sig. Digits |
|---|---|---|---|---|---|
| byte | Integer | 1 | -128 | 127 | |
| short | Integer | 2 | -32,768 | 32,767 | |
| int | Integer | 4 | -2 billion | 2 billion | |
| long | Integer | 8 | -9.2x1018 | 9.2x1018 | |
| float | Floating Point | 4 | -3.2x1038 | 3.2x1038 | 7 |
| double | Floating Point | 8 | -1.8x10308 | 1.8x10308 | 15 |
| char | Character | 2 | Any Unicode character | ||
| boolean | boolean | 1 | false | true | |
| \b | backspace |
| \f | form feed |
| \n | new line (line feed) |
| \r | carriage return |
| \t | tab |
| \" | double quote |
| \' | single quote |
| \\ | backslash |
\uhhhh: hex-decimal code, e.g. \u000A
\ddd: octal code, e.g. \040
short timeInSeconds = 245;
char a = 'K', b = '$';
boolean flag = true;
double maxVal = 35.875;