Lets assume i have the following class definition:
class Test{
public String toString(){
return "hello test";
}
Now from another class i do the following:
Test myTest=new Test();
//output of below will be 'hello test'
System.out.println(myTest);
I am looking for the equivalent in Android so i could do something like this on objects:
Log.d("TAG",myTest);
or even createToast(Context,myTest,Toast.short).show();
I dont want to have to call the objects toString method, i just want to dump the object into the method and it knows it needs to call toString just like system.out.println did.