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
What string is utf8?
Which class represents the socket that both the client and server use to communicate with each other?
Difference between static binding and dynamic binding?
What is arguments in java?
What is string in java with example?
Does unicode support all languages?
How to create a thread in java?
Is main an identifier?
Is void a wrapper class?
How many decimal digits is 64 bit?
How does the garbage collector works in java?
how to write a program for sending mails between client and server
What are the basic concepts of OOPS in java?
what is static import in java? Explain
describe synchronization in respect to multithreading? : Java thread