Created
February 16, 2014 19:51
-
-
Save KeithYue/9039675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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