Understanding use of “this” in java
问题 I'm trying to understand the this keyword in java. I wanted to rewrite this code by using the this keyword instead. Please let me know if I've done it right. Here's the original code: public class Book { private String title; private String author; private String publisher; public Book(String bookTitle, String authorName, String publisherName){ title = bookTitle; author = authorName; publisher = publisherName; } } And here's the re-written code: public class Book { private String title;