Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Experience the convenience of getting accurate answers to your questions from a dedicated community of professionals. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.
Sagot :
Answer:
within the Book class but needs to also be outside of any methods.
Explanation:
If Ben is creating an entire Book class then the instance variable needs to be within the Book class but needs to also be outside of any methods. If Ben places the variable inside a method it can only be used by that method and therefore becomes an instance variable of that method and not the class. By creating it inside the class and outside the methods it can be used every single time a Book object is created. Therefore, creating an instance variable of serialNumber every time.
Thanks for stopping by. We are committed to providing the best answers for all your questions. See you again soon. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. Thank you for choosing Westonci.ca as your information source. We look forward to your next visit.