Answer Posted / madhu
public class MainClass {
public static void main(String[] args){
ClassLoader classLoader = MainClass.class.getClassLoader();
try {
Class aClass = classLoader.loadClass("com.tech.MyClass");
System.out.println("aClass.getName() = " + aClass.getName());
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are tlds in java?
What is ehcache in java?
What is difference between map and flatmap in java 8?
How do I know if I have jre or jdk?
Are the actual permissions for the application defined at run-time or compile-time? : java security
In system.out.println(), what is system, out and println?
What is the difference between lambda expression and anonymous methods?
What are jdk tools?
Is lambda expression an object?
What is hql in java?
How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))
Can we write lambda without functional interface?
How do I enable java in firefox?
What does jpa mean?
what are the different phases in delivering the project during development and maintenance?