Last active
January 2, 2019 20:48
-
-
Save briantliao/677990a38ef1382d557f3bfefc108714 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Primitive types: | |
// int for integer number: -2, -1, 0, 1, 2 | |
int n = 5; | |
// double for decimal numbers: 2.0, -1.3, .23 | |
double pi = 3.14; | |
// boolean: true or false values | |
boolean isHappy = true; | |
// char for single characters: c, a, q, 1, !, $, \n | |
char c = 'g'; | |
// Reference types: | |
// These are objects and can be null | |
// String for text: | |
String line = "Hi my name is Jeff."; | |
// Other objects like arrays, ArrayList, or self created like Dog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment