What restrictions are placed on method overloading and
method overriding?

Answer Posted / javaguy

About said are absolutely correct. I would like to add some
more to method override.

The class/program who is overriding method should have
orverriding method visibility / access modifiers should be
same are greater but should not be lower.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you sort words in java?

536


How finally used under exception handling?

516


How do you trim a space in java?

500


Explain the difference between serializable and externalizable in java?

539


How are variables stored?

533






What is difference between ++ I and I ++ in java?

531


How do you create a reference in java?

511


What is the purpose of an interface?

556


Can we create object of static class?

528


How many types of variables are there?

673


What is difference between iterator and enumeration in java?

527


Why do we need hashmap in java?

555


Explain java coding standards for constants?

576


Can you override static methods?

502


Can you call a method in a method?

531