What is Data Types ?
For easier and efficient processing, data is classified into different types (Data Types) such as byte, char, boolean, int, float, String, Array, Enum etc. These data types can be grouped as Primitive and Composite (or Reference Type).
As their names suggest, primitives form the primary building blocks(these usually have built-in support in the language) and composites are usually made up of one or more primitive type.
Each Data Type determines
- the meaning of the data that it represents
- the possible values it can take
- the way or format in which the value of this type is stored
- the possible operations that can be performed with it
Java is a statically typed language, which means that the type imposes some constraints on the value it can hold and the operations that can be performed, and this is verified by the compiler during the compilation.
In Java, we need to declare the type of a variable before being able to use it. For example if we want to store a value
We have to first declare
Select all the correct statements given below.
- The contents of PDF and Text files are not stored as bits in a Hard Disk.
- If a text file contains only a decimal value
12 , then the value12 is stored as1100 in its binary form
0 Comments