Java Notes Complete
Java Notes Complete
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
Imports everything in
the value. This lets you get user input.
object.
15. byte
6. final
23. System.in
These can store from -127 -
Cannot be changed;
128. This lets you get data from
common to be defined with
the keyboard.
all uppercase.
16. long
24. public [class]()
7. double Can store numbers from
2^127 to 2^-127. This will be the constructor,
Integer with numbers that
you use it to create new
can have decimals.
objects.
17. char
Decrement by [amount]
48. this
39. if ([condition])
Refer to the class that you
31. *= [amount] This will make it so if are in.
[condition] is true then it'll
Multiply by [amount] keep going.
49. [caller].next[datatype]()
80. Arrays.copy0f([array],
74. [type] [returntype]
indexes);
[name]([parameters]) {
This will copy the array and
This is a way to create a
how many indexes into
method.
another array.
75. [type][[indexes]]
81. Arrays.toString([array])
This will create an array
Convert the whole array
with [indexes] amount of
into one huge string.
indexes; default infinite.
82.
76. int[] something = new
Arrays.binarySearch([array],
int[20];
[object])
This will just make an array
This will search for [object]
of ints with 20 ints in it.
in [array].
78. [object][[1]][[2]][[3]]
[name] = {[value] [value]
[value] \n [value] [value]
[value]}
79. .length