1日目
This commit is contained in:
13
Student_20261014_hirayama.java
Normal file
13
Student_20261014_hirayama.java
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
public class Student {
|
||||
//フィールドの宣言
|
||||
String name;
|
||||
int age;
|
||||
|
||||
//メソッドの定義
|
||||
public void intoroduce() {
|
||||
System.out.println("私の名前は" + this.name);
|
||||
System.out.println("年齢は" + this.age);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user