Day 35

 Hello!.

 We are following the basics of Java

What Are Variables?

A variable is a storage location in memory for a specific value.

Data Types:

  1. int: For integers (32-bit).
  2. double: For floating-point numbers.
  3. char: For single characters.
  4. String: For text.
  5. boolean: For true/false values.

Example:

int age = 19; double price = 10.99; char grade = 'A'; String name = "Bavly"; boolean isStudent = true; System.out.println("Name: " + name + ", Age: " + age);

تعليقات

المشاركات الشائعة