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 |
What is casting?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What is considered an anti pattern?
How does indexof work?
What is a instance variable in java?
What is singleton class and how can we make a class singleton?
how many types of cloning?
Can we extend singleton class?
What Is Resource Leak?
What is a local, member and a class variable?
What is the benefit of inner classes in java?
Is java a digit method?