Is there any need to import java.lang package?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / rakesh
navneet can u justify your ans with example plzzzz.
| Is This Answer Correct ? | 1 Yes | 4 No |
How to find the largest value from the given array.
What is an anonymous class in java?
What is final modifier?
What are variable names?
What are generic methods?
Is null false in java?
Can java program run without jre?
Can constructor be protected in java?
How is Object Oriented Programming different from Procedure Oriented Programming?
What is boolean logic?
What modifiers are allowed for methods in an interface?
What does the “static” keyword mean? Can you override private or static method in java?