0
This question deals with the software world...
A compiler contains a phase called storage assignment phase. This phase allocates memory for different variables used in your program. It also creates the structure to store the data efficiently in the location. Hence, the compiler must know the type of data you are likely to supply for storage to ensure optimum utilization of memory space. This is the reason, data types are required in Java programming and the variable is need to be declared before using it in the program.