Q:

How is it possible that println works inside void method? 

public void debit (double amount){
    if (balance<amount){
        System.out.println("Amount withdrawn exceedes the current balance");
    }
    else {
        balance-=amount;
    }
}

When I call toString in main I get message "Amount withdrawn exceedes the current balance" and then toString content.  How is it possible when method is void? 

A:

It does not return anything to any method which calls your method.  Simply prints your message to the screen.  Simple as that :)

