Java is statically typed language, we always need to define a keyword, which type of the variable is and that keyword is called DataType. We declare data type before a variable. For example, int x; here int is an integer data type. Data types specify the different sizes and values that can be stored in the variable. In the last tutorial, we have seen the Java Collections example.
However, there are two types of data types in Java.
Once a variable is declared to be of a certain data type, it cannot hold the values of other data types. Example: C, C++, Java. Other, Dynamically typed languages: These programming languages can receive different data types over time. Ruby, Python, Javascript, etc.
Now we will discuss these two data types.
#java #python #javascript #c++