008-004-010

Methods with Multiple Arguments

Easy

Problem Description

Methods with Multiple Arguments

In this problem, you will create a program that reads a name, age, and job from standard input, then defines an introduce method accepting three arguments (String name, int age, String job) and displays a self-introduction message to standard output.

Learning Objective: Understand how to define and call methods with multiple arguments

Overview

Define a method with multiple arguments and understand that argument order matters.

Input Format

name
age
job

Specifications

  • Define introduce(String name, int age, String job) method
  • Method outputs self-introduction text
  • Read values with Scanner and pass them to introduce

Output Format

Name: [name], Age: [age], Job: [job]

Example

Input:
Tanaka
25
Engineer

Output:
Name: Tanaka, Age: 25, Job: Engineer

Ready to Try Running Code?

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

Don't have an account?

Sign Up