Advertisement
Lyutov02

OP1

Feb 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. public class OP1 {
  2.     public static void main(String[] args) throws Exception {
  3.  
  4.         Book myBook = new Book();
  5.         myBook.title = "A Study in Scarlet";
  6.         myBook.author = "Sir Arthur Conan Doyle";
  7.         myBook.pages = 106;
  8.         myBook.currentPage = 85;
  9.         myBook.printInfo();
  10.         myBook.nextPage();
  11.         System.out.println(myBook.currentPage);
  12.         myBook.skipPages(12);
  13.         System.out.println(myBook.currentPage);
  14.  
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement