Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to convert a class object into String type

807589Oct 30 2008 — edited Oct 30 2008
private static final ModuleName MODULE_NAME = ModuleName.TSE;
String lModuleName = (String)MODULE_NAME;
error : "Cannot cast from ModuleName to String"
whats wrong in this code..?

(ModuleName is the class of type --> public final class ModuleName)

Edited by: avula on Oct 30, 2008 1:05 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2008
Added on Oct 30 2008
11 comments
1,020 views