002-001-009

Scanner Class Basics: Hobby Survey

Easy

Problem Description

Scanner Class Basics: Hobby Survey

Learning Objective: Understand Scanner class creation and nextLine() method usage

In a hobby survey program, input and display your favorite hobby. Using Scanner, you can receive data from users during program execution.

Input

Line 1: Hobby (string)

Output

================================
      Hobby Survey
================================
What a wonderful hobby!
Your hobby: [hobby]
================================

Examples

Example 1: Reading

Input:

Reading

Output:

================================
      Hobby Survey
================================
What a wonderful hobby!
Your hobby: Reading
================================

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