Day2第一段階完了

This commit is contained in:
m-endo
2026-09-15 13:22:22 +09:00
parent 4ac32d9a18
commit 01b47fa684
2 changed files with 29 additions and 7 deletions

View File

@@ -2,15 +2,22 @@
public class BasicCheck1 {
public static void main(String[] args) {
Book book = new Book();
//Book book = new Book();
book.title = "吾輩は猫である";
book.author = "夏目漱石";
book.price = 800;
//book.title = "吾輩は猫である";
//book.author = "夏目漱石";
//book.price = 800;
//System.out.println(book.title);
//System.out.println(book.author);
//System.out.println(book.price);
//引数なし
Book book1 = new Book();
//引数あり
Book book2 = new Book("銀河鉄道の夜", "宮沢賢治", 500);
System.out.println(book.title);
System.out.println(book.author);
System.out.println(book.price);
}
}