Java Design Pattern
Introduction to Java 10
Introduction to Java 11
Introduction to Java 12

Data types in Java

It is important to state that java is a strong type language.

We know that a variable is nothing but a named memory allocation.

A variable is defined by data type. That means the data type specifies the size and type of values that can be stored.

When we want to use a variable in a program, we should first declare it as

int a;

Here a is a variable which can store integer data. int is called data type for example

A can store an integer number like 150 as

int a=150;

Here the value 150 is assigned to a which is called literal.

There are four basic primitive data types.

  1. Integer Datatypes
  2. Double Datatypes
  3. Character Datatypes
  4. Boolean Datatypes

About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.


We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc






 PreviousNext