Data Types In Java

Java Data Types

Primitive data types: These data types allow variable to store only one value.
    Ex: double salary = 25350.56;
Non-primitive or derived data types: These data types allow the variables to store multiple value of the same data type.
   Data Types:
   Arrays
           Ex: int a[] = {10,20,30,40,50}
   Strings are enclosed in ""
           Ex: String printval = "welcome";

User defined data type: These are developed by programmers and whose variables allows to store multiple values wither of the same type or different type or both.
Ex: classes, interfaces.


Comments

Popular posts from this blog

Constant in Java

Java History, Features and Application types