So many types

Report a typo

Java has a large number of primitive types and some of them have not been specified in theory. In this task you need to read the corresponding section in the documentation and for each initialized variable in the following code define the most suitable type for it.

Pay attention to the minimum and maximum values of the numerical variables.

Fill in the gaps with the relevant elements
public class Main {
    public static void main(String[] args) {
         data1 = "Hello, world!";
         data2 = 'H';
         data3 = 127;
         data4 = 2 ^ 31 - 1;
         data5 = 3.1415926;
         data6 = true;
         data7 = 2 ^ 63 - 1;
    }
}
booleanlongStringintdoublecharbyte

Create a free account to access the full topic