Thursday 20 October 2016

What is data type

What is Java data type

Brush up Before Datatype :
  • Hope you successfully done Hello world program.
  • After first chapter we need to keep more attention on Java Data types
What is Datatype:
  • Data type refers to the type of data which stores in a variable.
  • Java is called a “strongly typed language”, means If you declare a variable, you should specify the variable by using data type.
  • Then the compiler confirms that what type of data you are using.
Example
Suppose i said as,  “That is Mango Tree”, here i already declared as :
a). This tree gives Mangoes.
Points to remember :
  • Mango word tells us  what and which type in trees community.
  • So, it's not possible to say again as “Mango tree is a lemon tree” which is invalid to understand.
Valid statements
        a). Mango fruits are good in taste.
        b). Mangoes are might be small or big in size.
        b). Mangoes are in yellow color.
Invalid statements:
        a). Mango tree gives lemon fruits
        b). Mango is in white color.

  •  In Java also, before using any data you have to declare what type of data you are going to use in a program
    Thanks for your time.
    Nireekshan