Thursday, 22 September 2016

Data Types

Data types specify:
1. Size of the memory location.
2. Range of the data that can be accommodated.
3. Type of the data stored in the system with which you want to execute the logic.


      Syntax:           Data-type  Variable-name;

Examples:

  1. byte b;
  2. short s;
  3. int x=10;
  4. long l;
  5. float f=10.32;
  6. double d;
  7. boolean t;
  8. char c='a';

Cheers,
Navatha.

No comments:

Post a Comment

Keywords in Java

Keywords are reserved words in java which act as a key to code and has the intent of its own use. Rules for Keywords:  Keywords should ...