TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Java

Java Polymorphism

Overview

In this tutorial, we will learn about Java Polymorphism. Polymorphism is the ability of an object to take on many forms.

Java Polymorphism

Polymorphism is one of the basic principles of Object-Oriented Programming. There are two types of polymorphism:

  • Static Polymorphism
  • Dynamic Polymorphism

 

Java Polymorphism

Polymorphism is the capability of an action or method to do different things based on the object.

Method Overloading

Method overloading is defining more than one method with the same name but with different method signatures. The name of the method is the same but the number and type of method parameters and method return types might be different. When an overloaded method is encountered, Java executes the version of the method whose parameters match the arguments used in the method call.

Method overriding

Method overriding allows programmers to provide different implementations for the methods in parent class and subclasses. The method name and the method signature would be the same but with different implementations. The actual method called depends on the type of object at runtime.

—

Java Tutorials

Java Tutorial on this website:

https://www.testingdocs.com/java-tutorial/

For more information on Java, visit the official website :

https://www.oracle.com/in/java/

Related Posts

Download Greenfoot Windows

Java /

Download & Install Greenfoot on Windows

Java /

Java Static Code Analysis

Java /

Java Testing Tools

Java /

Handle Multiple Exceptions in Java

Exceptions_In_Java

Java /

Exceptions in Java Programs

‹ Java Inheritance› Java Runnable Interface

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version