Skip to content

Instantly share code, notes, and snippets.

@jpzhu
Created September 6, 2013 05:43
Show Gist options
  • Save jpzhu/6459973 to your computer and use it in GitHub Desktop.
Save jpzhu/6459973 to your computer and use it in GitHub Desktop.
java test
package com.windriver.ps.test;
class example{
private int num;
void setNum(int n){ num = n;}
private int getNum(){ return num;}
public static void main(String args[]){
example ex = new example();
ex.num = 6;
int n = ex.getNum();
System.out.println("Num="+n);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment