This. makes more sense
Casey Echternacht

Casey Echternacht @caseyeee

About: 3rd year CS student

Location:
Aurora, Colorado
Joined:
Aug 23, 2022

This. makes more sense

Publish Date: Jan 11 '23
0 0

I'm now taking the time to make flashcards when I study. This practice is forcing me to stop when I don't understand something. The whole concept of "this." in Java is easy to skip past when I'm watching tutorials at 2x speed; it finally makes sense though.

"this." allows us to have identical names for fields and parameters without causing confusion.

public String text;

public void setText(String text) {
this.text = text;
}

99

Comments 0 total

    Add comment