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 a singleton class and when do you use it?
Singleton class have a private constructor. while we can't create an object from outside of class, we can create an object only once.
Prakash
What are the most important topics in Java interviews for a fresher?
OOPS Multithreding String Handling Execption Handling Collection Freamwork JDBC Servlet Jsp Spring core Moudle Spring MVC
Advaith
0 0
6
What is the general syllabus covered in core Java training from any institution?
you can check the syallbus on http://felix-its.com/java-training-pune/
Shiv Kohli
0 0
5
Can u explain init() method is used in servlet for initialization then constructor also there for initializing variables.then what makes the difference between init() and default constructor in servlets?
Using init() only advisable than default constructor because we cannot initialize servlet using constructor because servlets are not directly instantiated by javacode, instead container create instance...
Anwar
Where advanced java can be utilized?
Advanced Java is an extension of Java used for developing and running enterprise software and large-scale multi-tiered, scalable, reliable and secure network applications.
Nish

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 8 Predicates
In the previous lession, we have learnt how to use filters and collectors. In filter we have passed the condition to evaluate whether the object is eligible to be filtered or not. Code given below for...

Final modifier in Java
Can’t change value of variable if marked as final. It is best practice to mark method parameter as final if its value will not changes. Variable must be initialize either using Initializer block...

Easy way to remember Java keyword.
ACCESS MODIFIER ACCESS SPECIFIER abstract, assert, const, final, native, static, strictfp, super, synchronized, this, transient, void, volatile public, private, protected, default DATA...

Rohit Deshbhratar

1 0
0

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

Java: A Quick Overview
Not purely Object Oriented: It doesn't support multiple inheritence, it supports primitive data types and static members. Doesn’t support multiple inheritance: Reason is diamond problem i.e.,...

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