Right now You are returning the Object. As you said that it is giving the address that means you are printing it.
Something like this
System.out.println(Object)
If it is showing address that means you haven't overridden the toString
method
If you need to show all the properties of the object then, the efficient way to do this is to override ToString method
@Override
public String toString()
{
//Your properties here
}
Other way to do it will be printing the values by using the getter methods.
You can easily generate these methods if you are using and IDE like eclipse or IntelliJ. or you can use Lombok