Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEmacs
linenumberstrue
public class TalkMan(){ 
//...............
	private int sayCount = 0;

	private void increseSayCount()
	{
		sayCount++;
	}

    public void say(string message)
    {
        if(sayCount==0)
            hello(message)
        else
            helloAgain(message);
 
        increseSayCount();
    }
 
//................
}


talkMan.say("Hello, World!");

talkMan.say("Hello, World!");

talkMan.say("Hello, World!");

talkMan.say("Hello, World!");

이 봐 토크맨~ 나는 헬로우 월드를 찍고 싶을 뿐이야!  내가 여러번 사용하면 Again만 붙여 달라고~

...