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
If try block is successfully executed, Then Is Finally block executed?
Explain when noclassdeffounderror will be raised ?
How do I print a “?
What does s mean in regex?
Is array serializable java?
What is backdrop?
Can bool be null?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Is main is a keyword?
What is difference between string and new string?
Where is java located?
What is a top level class in java?
Which is faster set or list in java?
what is the swingutilities.invokelater(runnable) method for? : Java thread
What does next mean in java?