001-001-010
Variables: Integer Variable Declaration and Assignment
Easy
Problem Description
Variables: Integer Variable Declaration and Assignment
Learning Objective: Understand basics of integer variable declaration and assignment
Overview
Variables are containers for temporarily storing data in programs. In Java, you must declare the type and name of a variable before using it.
Specifications
Create a program that declares three integer variables, assigns values, and outputs them.
- Assign 25 to variable
age - Assign 2024 to variable
year - Assign 85 to variable
score - Output the three variable values, one per line
Output Format
25
2024
85
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
