Translate

Saturday, March 28, 2020

Data Types in JAVA

Data Types

Definition :  It identify the different size and value that can be stored in the variable.


There are two types of Data Types in Java...

  • Primitive
  • Non-Primitive

Primitive :



Non - Primitive : Classes, Interfaces, Arrays and String. 


How to use data type in java


Example : int a = 19;

    Note : "☝This is instance variable..."

  • int   :  data type
  • a     : variable name
  • =     : assignment operator or constant
  • 19   : literal value
  • ;      : statement terminator 




No comments:

Post a Comment

Constructor in Java

Rules of Constructor Class name and constructor name must be same Constructor is able to take parameters Constructor is not allowed re...