Java method Overriding
Below example illustrates method Overriding in java. Method overriding in java means a subclass method overriding a super class method. Superclass method should be non-static.
In this section, you will study the use of test() method. The test() method returns true if a pattern exists within a string, otherwise it returns false. This method searches a string for a specified value.