Question: In the code below what is this on line 3 3 : public class Record { private String title; private String artist; private int yearReleased;
In the code below what is "this" on line :
public class Record
private String title;
private String artist;
private int yearReleased;
Constructor
public RecordString title, String artist, int yearReleased
this.title title;
this.artist artist;
this.yearReleased yearReleased;
Accessor methods
public String getTitle
return title;
public String getArtist
return artist;
public int getYearReleased
return yearReleased;
Display method
public void display
System.out.printlntitle artist yearReleased ;
comesBefore method
public boolean comesBeforeRecord record
int artistComparison this.artist.compareToIgnoreCaserecordgetArtist;
if artistComparison
return true;
else if artistComparison
return this.yearReleased record.getYearReleased;
else
return false;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
