When we're using python shell, we can use the following statements if we want know data type of Data type of the added variables.
>>> y=5
>>> x=3.56
>>> type(x+y)
<class 'float'>
Here, my question is how I do this in Java? I'm not asking about statements given below.
String str = "test";
String type = str.getClass().getName();
It gives us only the data type that we already declared. But I'm asking that the data type of Data type of the added variables.