Loading...
Logo
Processing Forum
println(this) inside an object's function returns something like:
ProjectName$ClassName@6dbdc9

I can see this being useful to store as a String, but it doesn't seem to want to cast itself as such.

How can I get that string into a String?

Replies(2)

String name = toString();
or
String cname = someObject.toString();

You can also override the toString() method to define your own name (generally descriptive of the values in your class).
Huh, I thought I tried that but I must not have formatted it correctly.  Thanks!