問題1, で作成したHumanクラスのインスタンス作成時に、ageフィールドに値を代入できるよう、プログラムを修正してください。 代入する方法としては、コンストラクタを使用し、コンストラクタの引数の値を代入してください。
public class Human{ private int age; public Human(){ this.age = age; } public int getAge(){ return this.age; } }
問題1, で作成したHumanクラスのインスタンス作成時に、ageフィールドに値を代入できるよう、プログラムを修正してください。 代入する方法としては、コンストラクタを使用し、コンストラクタの引数の値を代入してください。
public class Human{ private int age; public Human(){ this.age = age; } public int getAge(){ return this.age; } }
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description