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 |
Is it possible to use string in the switch case?
What is the argument type of main() method?
Why do we use threads in java?
What is the technique adopted to create an immutable class?
What is a static method in java?
What is the difference between a public and a non-public class?
Write a factorial program using recursion in java?
Is multiple inheritance allowed in Java? Why ?
How the elements are organized in BorderLayout?
How does sublist works in java?
1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))
What are conditionals and its types?