The example method is assumed to be used as main() function. As a main() function doesn't have any return values, the example doesn't compile and is invalid.