

Lesson 1
Presentation
•
Computers
•
6th Grade
•
Practice Problem
•
Hard
raedah kalakh
Used 1+ times
FREE Resource
5 Slides • 1 Question
1
Introduction to Java Variables
By Raedah Kalakh, 20251360057
2
Variables are containers for storing data values.
12
age
A variable is like a box that holds something inside it. The thing inside can change, but the box stays the same.
Example:
📦 Box name: age
🎁 Inside the box: 12
Later, you can change what’s inside:
🎁 Now inside the box: 15
15
age
3
In Java, there are different types of variables, for example:
String - stores text, such as "Hello". String values are surrounded by double quotes
int - stores integers (whole numbers), without decimals, such as 123 or -123
float - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes
boolean - stores values with two states: true or false
4
Syntax
type variableName = value;
Where type is one of Java's types (such as int or String), and variableName is the name of the variable (such as x or name). The equal sign is used to assign values to the variable.
5
Example
Create a variable called name of type String and assign it the value "John".
Then we use println() to print the name variable:
String name = "John";
System.out.println(name);
6
Fill in the Blanks
Create a variable called myNum of type int and assign it the value 15:
Introduction to Java Variables
By Raedah Kalakh, 20251360057
Show answer
Auto Play
Slide 1 / 6
SLIDE
Similar Resources on Wayground
6 questions
History Chapter 15 L. 178
Presentation
•
6th Grade
6 questions
Algebra
Presentation
•
6th Grade
6 questions
Arunachal Pradesh
Presentation
•
6th Grade
6 questions
It’s Nice to meet you
Presentation
•
6th Grade
6 questions
Naming Shapes
Presentation
•
KG
6 questions
LÓGICA DE PROGRAMACIÓN
Presentation
•
5th Grade
6 questions
Ancient Egypt
Presentation
•
6th Grade
3 questions
science
Presentation
•
6th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade