java - Problem to Type casting -
i using bonita api java docs(bonita api) instanceuuid of process , instanceuuid of type processinstanceuuid.using getvalue(), convert object value in string , send java class want typecast string processinstanceuuid class object type.
it possible,if possible please give me idea solve problem.
processinstanceuuid instanceuuid = this.getprocessinstanceuuid(); instanceuuidvalue = instanceuuid.getvalue();
thanks
from api:
processinstanceuuid instanceuuid = this.getprocessinstanceuuid() string instanceuuidvalue = instanceuuid.getvalue(); processinstanceuuid newuuid = new processinstanceuuid(instanceuuidvalue);
as @nivas said, not typecasting. here example of type casting:
object obj1 = "hello world"; // obj1 in fact string object obj2 = new integer(2); // obj2 integer string mystring1 = (string) obj1; // explicitly type cast object string // next statement throw exception @ runtime because obj2 not string string mystring2 = (string) obj2;
Comments
Post a Comment