What happens when you don't return anything?
you use void when you don't expect any value to be returned from that method. for example int height = calculateHeight (); then you expect the method will return integer value. But if you want your method only to do something then you can use void
it returns the garbage value.
if d return type is void.. den itz k.. else u jst need to type return.. so dat the cursor gets back to where it is called. ..
we can use void so that there is no need of return to be used....but once you r using int we need to return the value otherwise garbage value