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 the difference between static and non-static variables in java programming?
What are the default and parameterized constructors?
How do you pass by reference?
Does garbage collection occur in permanent generation space in jvm?
How to create a fecelet view?
what is class.forname() and how it will be useful ?
What are the difference between string, string builder, and string buffer in java?
What is synchronization and why is it important in java programming?
why java does not support multiple inheritance
41 Answers Diamond, Euclid, Evergent, KLKJ, Mind Tree, NIIT, SSI Small Scale Industries, Wipro,
What is r * in math?
What is a java applet? What is an interface?
What was java originally called?