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 is a bean class?
What is predicate in lambda expression?
What services can invoke lambda?
How do I open the java console in windows 10?
What are struts java?
What is a service layer in java?
What about products that claim to block java applets at a firewall? : java security
How can I write a program that takes command line input?
What is the meaning of the words public, static and void?
Which interceptor is responsible for setting action javabean properties?
Can the main method be declared final?
What is use of jpa?
What is type_scroll_insensitive in java?
What is @override annotation in java?
Does ms edge support java?