Monday, 21 January 2013

Class X -Data types

Data Types :
  • Primitive data type:
  1. Boolean     -    1 bit
  2. byte            -    8 bits
  3. short          -    16 bits
  4. char           -    16 bits
  5. int              -    32 bits
  6. float           -    32 bits
  7. long           -    64 bits
  8. double       -   64 bits

  • Reference data type : The variable  will represent the  address
  1. Arrays
  2. classes
  3. Interface
Type conversion :
Converting one data type into another data type.
  • Explicit conversion or Type casting
The user can change from one data type to another type. 
double a;
int b;
a=(double)b;
Remember the data type should be whithin the bracket.

  • Implicit type conversion
 It is performed automatically.data will be converted from smaller data type to larger data type.
 The other name for variable is identifier.Literal is the other name for constant.

Escape Sequence :
Represented by a backslash( \ ) followed by one or more characters. Remember to use \ instead of /,coz in the trial exam most of you have used forward slash.

Operators :
This is a very important topic.I am going to skip the simple operators and concentrate more on increment decrement operators. I will post it tomorrow. If you need any topic in detail, let me know.

No comments:

Post a Comment