Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Native methods/member variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Native methods/member variables" Watch "Native methods/member variables" New topic
Author

Native methods/member variables

Willie Toma
Ranch Hand

Joined: May 11, 2001
Posts: 78
Can member variables, or any variables, be considered native?
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I believe only methods can be native.
Originally posted by Willie Toma:
Can member variables, or any variables, be considered native?


------------------
What's this H2SO4 doing in my fridge?? ( thud )


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Snylt Master
Ranch Hand

Joined: Jul 07, 2001
Posts: 55
I believe Dale is right.
According to Complete java 2 Certification Study Guide:
I Quote "The native modifier can refer only to methods....Native
indicates that the body of a method is to be found elsewhere."
Hope this helps!
// SnyltMaster


Preparing for the Java 2 Certification exam
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Native methods/member variables