Explain Method overriding

Method overriding: It is a method stated in a super class might be overridden by a method of similar name stated in a sub class. The two methods should have similar name and number and types of formal arguments. Any checked exception thrown by sub-class version should match the type of one thrown by the super class version, or be a sub-class of this exception. Though, the sub-class version does not encompass to throw any exceptions which are thrown by the super class version. This is significant to distinguish between method overloading and method overriding. Overloaded methods have similar names; however differ in their formal arguments.

   Related Questions in Programming Languages

  • Q : Define Unconditional Jumps

    Unconditional Jumps: Jumps which are not strictly upwards in the block hierarchy can require extensive control-flow manipulation, including creation of redundant code, and should be avoided if possible. Such jumps add considerable modeling overhead fo

  • Q : Kernel Mode Illustrate what are the

    Illustrate what are the different functions of Kernel Mode, interrupts and system calls?

  • Q : ID of TC Trustcenter Publisher and

    For how long are ID of TC Trustcenter Publisher and certificates of developer valid?

  • Q : Explain different types of variable iv

    The kind of value that a variable can own is known as data type. When we state a variable we require specifying the type of value it will own with the n

  • Q : What is Bit manipulation operator Bit

    Bit manipulation operator: Operators, like &, | and ^, which are employed to examine and manipulate individual bits win the bytes of a data item. The shift operators, <<, >> and >>>, are too bit manipulation operators.

  • Q : Limit the Use of Pre-processor

    Limit the Use of Pre-processor Directives: The C pre-processor is powerful, but unrestricted use of it can lead to code that is hard to understand and analyze. Limit its use to inclusion of header files and simple macro definitions. Avoid features suc

  • Q : Define Hexadecimal Hexadecimal : Number

    Hexadecimal: Number representation in hexadecimal is base 16. In base 16, the digits 0-9 and the letters A to F are utilized. A symbolizes 10 (base 10), B symbolizes 11 (base 10), and so forth. Digit positions symbolize successive pow

  • Q : What is Control structure Control

    Control structure: A statement which affects the flow of control in a method. The typical control structures are if statements and loops.

  • Q : Special set of tags in PHP Normal 0

    Normal 0 false false

©TutorsGlobe All rights reserved 2022-2023.