Microsoft
Software
Hardware
Network
Question : Set Java Class toString name?
Hello,
1: 2:
Class testClass = Test.class; System.out.println(testClass);
How can I change what is printed out in the second line of this code? With an object, I would just override the toString() method. But how can it be done with a class?
Thanks,
Rich
Answer : Set Java Class toString name?
you can call it toString() if you like, eg.
public static String toString(Class clazz) {
return clazz.getName();
}
System.out.println(MyUtili
ty.toStrin
g(testClas
s));
Random Solutions
Outlook MAPI session query
EZ_GPO (Not so easy)
ipconfig shows lots of "tunnel adapters", what are they?
Where is resistance, force arm, and fulcrum in a Wheelbarrow?
Cisco ASA CSC setup
How to configure the network printer in the FreeBSD 8?
Hardware Firewall Configuration for Direct Access ( Teredo Tunneling)
How do I identify if I have RAID array setup?
SSRS Combine two datasets into one data region - Must be in report not in SQL server
Datareader object is already open message