Day2第一段階完了
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user