I created my own class called Property, and instantiated it. Now I am trying to print out one of its instance to the console, but what's been printed out has been this message shown:
and this is my code:
package playground;
public class PlayGround{
public static void main(String[] args) {
Property a = new Property("house",120.2,1989);
System.out.println(a);
}
}
package playground;
public class Property {
private String type;
private double area;
private int year;
public Property(String type, double area, int year){
this.type=type;
this.area=area;
this.year=year;
}
}