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
================================
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 6 free executions remaining