Language syntax
Java this expression
Refers to the current object in a permitted instance context.
Formal Syntax & Structure
java syntaxjava
this.fieldWorking Example
Example Snippetjava
class Book { private String title; Book(String title) { this.title = title; } String title() { return title; }}public class Main { public static void main(String[] args) { Book book = new Book("Atlas"); System.out.println(book.title()); }}