There are three ways to retrieve a class object.
1) Class cls = object.getClass();
2)
try {
cls = Class.forName("java.lang.String");
} catch (ClassNotFoundException e) {
}
3) cls = java.lang.String.class;
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment