Professional Documents
Culture Documents
Ans. : One of the most significant advantages of Java is its ability to move easily from one
computer system to another. The ability to run the same program on many different systems is
crucial to World Wide Web software, and Java succeeds at this by being platform-independent at
works by bringing together data and its behaviour (or method) in a single bundle called an
Ans. : Every Programmer has majorly two options when he gets into the field of coding,
that is he can choose to program either with Object Oriented programming or Procedural
the one suited for the programmer depends upon the requirements of the project and the
application of the project that he is working on. Additionally, it also depends on the
referring to the idea that an entity in code such as a variable, function or object can have
more than one form. The word polymorphism is derived from Greek and means "having
multiple forms." Apart from computer programming, the idea of polymorphism occurs in
Polymorphism is one of the most important concepts in OOP. It describes the ability of
something to have or to be displayed in more than one form. The different forms arise
because these entities can be assigned different meanings and used in various ways in
multiple contexts.
Let us consider the given example in which the function perimeter() is overloaded. In each function, the perimeter of a different
shape (square, rectangle and trapezium) is calculated.