CSE 412 LAB
Sunday, January 22, 2012
access private variable
private int x=10;
private int y=15;
public void accessPrivateVariable(){
int res=0;
res =x+y;
System.out.println(res);
}
** variable out side any method are called instance variable
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment