007-001-004

Class Creation: Product Information

Easy

Problem Description

class Creation: Product Information

In this problem, you will create a program that defines a Product class with name and price fields, instantiates it with values read from standard input, and displays the product information to standard output.

Learning Objective: Understand the basic structure of classes

Create a Product class with name and price, and display product information.

Input

Line 1: Product name (string)
Line 2: Price (integer)

Output

Product: [name]
Price: [price] yen
```java

## Example
Input:
```java
Pen
100
```java
Output:
```java
Product: Pen
Price: 100 yen

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