Which of the following options contain correct code to declare and initialize variables to store whole numbers?
c, d, f, g
Options (a) and (b) are incorrect.
There are no primitive data types in Java with the names bit and integer.
The correct names are byte and int.
Option (c) is correct.
It assigns a hexadecimal literal value to the variable a3.
Option (d) is correct.
It assigns an octal literal value to the variable a4.
Option (e) is incorrect.
It defines a variable of type double, which is used to store decimal numbers, not integers.
Option (f) is correct.
-0 is a valid literal value.
Option (g) is correct.
123456789 is a valid integer literal value that can be assigned to a variable of type long.