DEV Community

Cover image for Data Types
Keerthana M
Keerthana M

Posted on Edited on

Data Types

DATATYPE:

  1. byte --> 1byte
  2. short --> 2byte
  3. int --> 4byte
  4. long --> 8byte
  5. float --> 4byte
  6. double--> 8byte
  7. char()--> can store single letter in a single quotes('A')
  8. boolean--> True or False

Variable Declaration:

  1. int mark = 100;
  2. Boolean variable = true;
public class  Home {
static String name = "Ragul";             // class information
Static int age =25                        // class information
}
Enter fullscreen mode Exit fullscreen mode

static refferes to class specific Information.

Top comments (0)