Loading

Exercise Number: 1

Default Access Modifier

  1. Scenario: You are creating a package for a library management system. Inside this package, create a class Book with a method displayDetails which prints the details of the book.
    • Task: Create the Book class with default access and another class Library in the same package. Call the displayDetails method from the Library class to show the book details.