Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dukker Jansen   on Nov 02 In Java Category.

  
Question Answered By: Mike Stephens   on Nov 02

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;

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on conversion of object to string Or get search suggestion and latest updates.


Tagged: