This code will compile fine with no error.
However what you have written is not method overriding
To override method you must declare them with same signature
I.e.
1) The return type, method name, and number and type of the parameters for
the overriding method must match those in the overridden method.
2) The overriding method can have a different throws clause as long as it
doesn't declare any types not declared by the throws clause in the
overridden method.
3) Access specifier for the overriding method can allow more access than the
overridden method, but not less. For example, a protected method in the
superclass can be made public but not private.