I dont know what you want to do, but to convert object to String, just do
this:
Ojbect[] varobject = {"First String", new Integer(1000), new
Double(100.55)};
String test = (String)varobject[0];
In your case:
sample p = new sample(12,45.60,"test");
String x = String.valueOf(p.x);
String y = String.valueOf(p.y);
String s = p.s;