View Single Post
  #2 (permalink)  
Old 09-09-2008, 08:30 PM
Supamagier Supamagier is offline
Senior Member
 
Join Date: Aug 2008
Posts: 186
Supamagier is on a distinguished road
No, they're not.

Code:
public class Example1 { public static void main(String[] args) { Example2 e2 = new Example2(); e2.var = 56; // 1 e2.setVar(56); // 2 } } public class Example2 { public int var; public void setVar(int v) { var = v; } }
1 and 2 both work.

Is this what you mean or...?
__________________
check out
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
, 100% made by me.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote