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
Is linked list a linear or non-linear data structure?
Why does my function print none?
Explain about data types?
What is the relationship difference the canvas class and the graphics class?
Is an empty arraylist null?
What is singleton class in ruby?
How finally used under exception handling?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
What is the difference between C++ and Java and your preferences?
Write code of any action class?
What are the differences between stringbuffer and stringbuilder?
What is getkey () in java?
What is this () in java?
Why we used vector class?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?