Of course you can, you just need to compile your code. Oh wait, no you can't! I guess you cannot have a method inside another method then. The reason Java cannot do what C can is because it is Java...