Dexter

class Dexter {
    void run () {
        while(isAlive() && showCanceled == false ) {
            try {
                makeFriend()
            } catch (GoesCrayExption ie) {
                killFriend()
            }
        }
    }
}
Vote up this code2
  • Guest

    For compactness of code, use !showCanceled instead of showCanceled == false.