问题
I have this written in my app
LastFmServer server = AndroidLastFmServerFactory.getServer();
Artist[] results;
results = server.searchForArtist("Hatebreed");
Log.e("", results[2].toString());
Why does this code make this appear in logcat?
fm.last.api.Artist@2bf03488
回答1:
It's because that class doesn't implement its own toString, so you end up calling the one inherited from java.lang.Object
that gives you the class name and its hash.
来源:https://stackoverflow.com/questions/11924018/why-tostring-returns-an-hexadecimal-code