Skip to content

Instantly share code, notes, and snippets.

@KeithYue
Created February 16, 2014 19:51
Show Gist options
  • Save KeithYue/9039675 to your computer and use it in GitHub Desktop.
Save KeithYue/9039675 to your computer and use it in GitHub Desktop.
package io.keith;
import java.util.*;
import test.pkg.*;
public class ClassTest {
private String name;
private int age;
int k = 90;
public ClassTest(){
name = "Wang Yue";
age = 19;
}
public static void main(String args[]){
ClassTest ct = new ClassTest();
System.out.println(ct.name+' '+ ct.age);
}
}
class HashTableTest{
public void test(){
Hashtable <String, Integer>h= new Hashtable<String, Integer>();
h.put("One", 1);
h.put("Two", 2);
}
}
class AccessTest{
private int x = 10;
private void sayHello(){
System.out.println("Hello WangYue");
}
public int getX(){
return this.x;
}
public void saiHi(){
this.sayHello();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment