007-002-004

Class Declaration and Object Creation: Student Class

Medium

Problem Description

In this problem, you will create a program that instantiates an object using the new keyword, sets initial values via the constructor, and displays the result to standard output.

Object Creation

Use new keyword to create objects. constructor sets initial values.

Test Cases

※ Output examples follow programming industry standards

Input:
Yamada
1001
Expected Output:
Student ID: 1001
Student Name: Yamada
Input:
Suzuki
2050
Expected Output:
Student ID: 2050
Student Name: Suzuki
Input:
A
1
Expected Output:
Student ID: 1
Student Name: A
Input:
Test
9999
Expected Output:
Student ID: 9999
Student Name: Test
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
Student.java🔒
Solution.java🔒
2/6 ファイル96B
⚠️警告
  • No main method found
import java.util.Scanner;

class Student {
}
0 B / 5 MB

You have 9 free executions remaining