001-003-008
Using Basic Data Types
Easy
Problem Description
Using Basic Data Types
Learning Objective: Understand the characteristics of Java's basic data types (int, double, char, boolean) and learn to use them appropriately
Overview
Create a program that declares variables of different data types, assigns appropriate values to each, and outputs them.
Specifications
Declare the following 4 variables and assign the specified values:
intvariableagewith value25doublevariableheightwith value175.5charvariablegradewith value'A'booleanvariableisStudentwith valuetrue
Output Format
Output each variable on a separate line in the format "variable_name: value".
age: 25
height: 175.5
grade: A
isStudent: true
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
