Java Quick Sheet
Java Quick Sheet
19. float
2. /* [comment] */
11. int 32-bit number with
Multi line comment.
decimals.
Can store numbers from
2^31 to 2^31.
3. public
20. protected
This can be imported
12. fields are attributes Can only be accessed by
publically.
other code in the package.
13. boolean
4. import [object].*
21. Scanner
Can have true or false as the
Imports everything in
value. This lets you get user input.
object.
17. char
25. super()
8. ; Just lets you put in one
chracter. This will create the
Put after every command.
superclass (the class it's
inheriting).
18. double
9. String
26. extends [class]
Just a string of characters.
Makes the object a subclass 35. public static void 44. <
of [object], [object] must be main(String[] args)
This means less than.
a superclass.
This is your main function
and your project will start in
here. 45. >
27. ++
This means greater than.
Will increment the amount.
36. System.out.print([text])
48. this
31. *= [amount] 39. if ([condition])
Refer to the class that you
Multiply by [amount] This will make it so if are in.
[condition] is true then it'll
keep going.
32. /= [amount] 49. [caller].next[datatype]()
78. [object][[1]][[2]][[3]]
[name] = {[value] [value]
[value] \n [value] [value]
[value]}
79. .length