الرجوع
تسجيل الدخول

Consider the following code. Which statement about the memory state at line Y is true?

class Book {
    String title;

    Book(String title) {
        this.title = title;
    }
}

public class Library {
    public static void main(String[] args) {
        Book book1 = new Book("Java Basics");
        Book book2 = new Book("Java Basics");
        book1 = book2;  // line Y
    }
}