UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why using Overriding in Java ?

Asked by Last Modified  

40 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Java Trainer

There was a student who always pronounces "University" as "Univerkity". His teacher got angry and called the parents and asked to know the reason. Teacher got shocked as they are pronouncing "Capacity" as "Capakity" Later she called student's grand parent with curiosity. And agian shocked as they...
read more
There was a student who always pronounces "University" as "Univerkity". His teacher got angry and called the parents and asked to know the reason. Teacher got shocked as they are pronouncing "Capacity" as "Capakity" Later she called student's grand parent with curiosity. And agian shocked as they pronounced "publicity" as "publikity". So it is the duty of the teacher to override the speaking mechanism of the student. As she can't change parent's method and has access to student method. If you want to write your own implementation for any method, you should use overriding, so that it's child classes / it's objects can use the new mechanism. read less
Comments

Software Developer, Expertise in Java/J2ee Technology.

Overriding is one of the most powerful concept, which is required to achieve polymorphism in java.
Comments

Java,J2EE,Spring,Webservices,Hibernate,Cloud And Android Expertise

Override can be achieved only in subclass. This can be used to change the behavior of super class method in child class.
Comments

Experienced QA Trainer

Method overriding is used to provide the specific implementation of the method that is already provided by its super class. Consider a scenario, Bank is a class that provides functionality to get rate of interest. But, rate of interest varies according to banks. For example, Bank-1, Bank-2 and Bank-3...
read more
Method overriding is used to provide the specific implementation of the method that is already provided by its super class. Consider a scenario, Bank is a class that provides functionality to get rate of interest. But, rate of interest varies according to banks. For example, Bank-1, Bank-2 and Bank-3 banks could provide 8%, 7% and 9% rate of interest. read less
Comments

It is used when a class that extends from another class wants to use most of the feature of the parent class and wants to implement specific functionality in certain cases.
Comments

Java/J2EE, B.E./B.Tech/MCA SubjectsTraining

when a class that extends from another class wants to use most of the feature of the parent class and wants to implement specific functionality in certain cases. We know method overriding will be coming in inheritance. Consider a mother and her daughter. Lets think mothers will cook, so her daughter...
read more
when a class that extends from another class wants to use most of the feature of the parent class and wants to implement specific functionality in certain cases. We know method overriding will be coming in inheritance. Consider a mother and her daughter. Lets think mothers will cook, so her daughter will also cook. One day mother cooked a biryani for her daughter. By using the method cookBriyani(rice,vegetables,water,salt). { // mother style of cooking } But her daughter didn’t like it. So her daughter decided to prepare biryani by herself. She is also going to use same ingredients but she is going to prepare in her style. Daughter method is cookBriyani(rice,vegetables,water,salt){ // daughter style of cookling } Daughter made also biryani so without changing the name i.e cookBriyani(), also she used same ingredients (i.e rice,vegetables,water,salt) i.e same parameter but she prepared in different style. read less
Comments

Java/J2EE/SFDC Corporate Trainer

To achieve polymorphism
Comments

Trainer

please come to skype we will give free demo for JAVA .. our skype id " goonline4training"
Comments

Method overriding is used to provide specific implementation of a method that is already provided by its super class. Method overriding is used for runtime polymorphism
Comments

Tutor

yeas !!!
Comments

View 38 more Answers

Related Questions

What is JavaBean?
All javabeans are pojos ,But not all pojos are not javabeans.
Ankit
0 0
6
What is the best book to learn data structures using Java?
There are several excellent books that can help you learn data structures using Java. 1. "Data Structures and Algorithms in Java" by Robert Lafore. 2. "Algorithms, Part I" by Robert Sedgewick and Kevin...
Shubham
0 0
5
When we are used the compiler and interpreter? what is the difference between them?
Java code is the best example of compiled as well as interpreted. Java Compiler does the task of compiling . Java file to .class file(binary form). JVM works as interpreter to let Operating system understand the compiled code instructions.
Shilpa
Should we learn DBMS and RDBMS without any Java training?
java or i can say any programming language is not required to learn DBMS or RDBMS
Karthik
0 0
6
Is synchronized keyword necessary, in Java, if everything that is modified in a function is local to that function?
No, it is not required if you make sure whatever parameters are updated/modified will be done as atomic references/operations. Atomicity is an alternative to syncronizatiom.
Abishiek
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java :: Inner Class Concepts
Java:: Inner Class Concepts--------------------------------- Inner class concepts introduced in Java v1.1 - as a part of AWT Event Handling improvements.When to use Inner class: - Without existing One...
M

Marimuthu P.

2 0
0


Programing Languages Learning Tricks
You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that...

Harshal G.

0 0
0

Inheritance In Java
Inheritance: The process of getting properties and behaviors from one class to another class is called inheritance. Properties: Variables Behaviors: Methods The main purpose of the inheritance...
D

Deleted U.

1 0
0

Differences Between HashMap vs HashSet In Java.
HashSet HashMap HashSet implements Set interface. HashMap implements Map interface. HashSet stores the data as objects. HashMap stores the data as key-value pairs. HashSet...

Recommended Articles

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more