Name and describe the eight primitive types included in Java.
Consider the following static method.
public static void mystery(int[] arr) { for(int i = 3; i < arr.length; i++) arr[i] = arr[i - 2]; for(int i = 0; i < arr.length; i++) { IO.print(" " + arr[i]); } }
byte | integer represented in 8 bits |
short | integer represented in 16 bits |
int | integer represented in 32 bits |
long | integer represented in 64 bits |
float | floating-point value in 32 bits |
double | floating-point value in 64 bits |
char | character represented in 16 bits |
boolean | a true/false value |