File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Access Modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Access Modifier" Watch "Access Modifier" New topic
Author

Access Modifier

Sulbha Jan
Ranch Hand

Joined: Jan 02, 2005
Posts: 37
Hello All,
Is there a way to find out programmatically, the access modifier of a method before actually using it...?

Thanks
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
Here is the code


LINE X : Check this link to see the constant values for all the modifiers.
click me

Just FYI, this is way out of SCJP objective scope.

[ January 09, 2005: Message edited by: Jay Pawar ]
[ January 09, 2005: Message edited by: Jay Pawar ]

Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
Sulbha Jan
Ranch Hand

Joined: Jan 02, 2005
Posts: 37
Thanks a bunch
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8883
    
    5
Sulbha, et. al.,

Just in case, after all of Jay's wonderful code, you guys didn't catch this...

It's NOT on the exam... phewww!


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access Modifier