-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLibrary.java
More file actions
27 lines (22 loc) · 788 Bytes
/
Library.java
File metadata and controls
27 lines (22 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package src;
public class Library {
private final String currentBookTitle;
private final String currentBookID;
private final String bookAuthor;
// Default src.constructor.
Library() {
currentBookTitle = "The Complete Sherlock Holmes";
bookAuthor = "Arthur Conan Doyle";
currentBookID = "Res-2020-367";
}
// Method just for showing default values set by src.constructor.
public void showCurrentBookInfo() {
System.out.println("Book Title : " + this.currentBookTitle);
System.out.println("Book Author : " + this.bookAuthor);
System.out.println("Book ID : " + this.currentBookID);
}
public static void main(String[] args) {
var l1 = new Library();
l1.showCurrentBookInfo();
}
}