Is there any need to import java.lang package?
Answer Posted / navneet raushan
Hi Rakesh .. I m writing the code
import java.lang.reflect.*;
public class DumpMethods {
public static void main(String args[])
{
try {
Class c = Class.forName(args[0]);
Method m[] = c.getDeclaredMethods();
for (int i = 0; i < m.length; i++)
System.out.println(m[i].toString());
}
catch (Throwable e) {
System.err.println(e);
}
}
}
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Can I overload to string method
What is a values collection view ?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
What is the purpose of the finalize() method?
Is age discrete or continuous?
How do you use find and replace?
What is the difference between Grid and Gridbaglayout?
Describe how to implement singleton design pattern in struts.
describe synchronization in respect to multithreading? : Java thread
What do you mean by scope of variable?
What are peerless components in java programming?
Can we use a default constructor of a class even if an explicit constructor is defined?
Can we overload the methods by making them static?
What is the purpose of main function in java?
What is boolean false?