Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Word{
- private String word;
- //Når vi oppretter ny word, så har vi minst 1 av den
- private int count = 1;
- Word(String s){
- this.word = s;
- }
- String tooString(){
- return this.word;
- }
- int getNB(){
- return this.count;
- }
- void incNB(){
- this.count++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement