The compiler doesn't like to be lied to. In this method:
you tell the compiler that you will be returning an int, but then don't. This ticks it off.
So either return an int, or tell the compiler that you don't intend to return anything (which is probably what's best) by declaring the return type as void.
Bear Bibeault wrote:The compiler doesn't like to be lied to. In this method:
you tell the compiler that you will be returning an int, but then don't. This ticks it off.
So either return an int, or tell the compiler that you don't intend to return anything (which is probably what's best) by declaring the return type as void.
here you are telling that this method returning int (myInt). And when you are not returning any value from method then you have to write return type as void. In your method
you are not returning any value therefore you had write void here instead of int.
Life is easy because we write the source code.....
You can't expect to wield supreme executive power just because
Gift giving made easy with the permaculture playing cards