I know this looks like splitting hairs, but the compiler looks for method signatures, which means the identifier of the method and the types of its parameters. So I would agree with Seetharaman Venkatasamy that you don't have a showVal() method, only showVal(int).