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 |
Same common question what is Map,Set,HashMap,List????
What is a reflection package?
explain copyonwritearraylist and when do we use copyonwritearraylist?
Is binary a low level language?
What is treeset in java collection?
How do you find the maximum number from an array without comparing and sorting?
What is basic syntax?
Write the algorithm to check the number non-leaf nodes in a tree.
how to run ecllipse with jettyserver for windows environment using batch file
why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all classes na. then what is the need of importing java.awt.event.*; ?
In a container there are 5 components. I want to display all the component names, how will you do that?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread