007-001-010

Class Creation: Basic Structure

Easy

Problem Description

Class Creation: Basic Structure

Learning Objective: Understand basic class structure and definition

Overview

Create a program with a simple class that has fields (attributes).

Specifications

  • Create a Person class
  • Define a String field name
  • Define an int field age
  • Create an instance in Main class, assign values, and output

Output Format

Name: Taro
Age: 20

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?