Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to sort array of 0 and 1 in java?

908


What is difference between path and classpath in java?

966


What is size of int in java?

1006


What is javac_g?

977


What is encapsulation in java?

1057


What is the synonym of string?

1044


Difference between static synchronization vs. Instance synchronization?

1064


How is string immutable in java?

998


Explain the significance of listiterator.

1036


For class CFoo { }; what default methods will the compiler generate for you>?

1031


Which class is the superclass for all the classes?

987


What is a treemap in java?

957


What is the meaning of 3 dots in java?

1115


What things should be kept in mind while creating your own exceptions in java?

1103


Explain about main thread in java?

1043