Created
October 30, 2015 21:27
-
-
Save konsolas/0edaa89f9033098fe530 to your computer and use it in GitHub Desktop.
Data Types
This file contains 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
//http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html | |
byte byteMin = -128; | |
byte byteMax = 127; | |
short shortMin = -32768; | |
short shortMax = 32767; | |
int intMin = -2147483648; | |
int intMax = 2147483647; | |
long longMin = -9.223372e+18L; | |
long longMax = 9.223372e+18L; | |
float floatMin = 1.4E-45f; | |
float floatMax = 3.4028235E38f; | |
//Doubles can have decimal places, e.g. 7.5 | |
double doubleMin = 4.9E-324D; | |
double doubleMax = 1.7976931348623157E308D; | |
//A boolean can only be true or false (Or null). | |
boolean boolean1 = true; | |
boolean boolean2 = false; | |
//Characters have to be surrounded in single quotes. | |
char myChar = 'c'; | |
String myString = "Hello! I am a string!"; |
i didnt know booleans can be null omg wow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wtf even RW