22.01 Variables and Data Types

Variables and Data Types

Overview

Java supports various data types and allows the declaration of variables to store data.

Topics

Examples

int number = 10;
double price = 19.99;
char grade = 'A';
String message = "Hello, Java!";

Tags

#java #variables #datatypes #primitivetypes #referencetypes #typecasting