[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Inheritance Method Overriding

Posted on 2004-10-22
2
Medium Priority
?
258 Views
Last Modified: 2010-03-31
if I have a method in a parent class like:

public void checkMonthlyFee()
{
     // method operations here
}

and I want to override this method with different operations in a child class, would I just rewrite that method in the child class as:

public void checkMonthlyFee()
{
     // NEW method operations here
}
0
Comment
Question by:smkJackstraw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
kiranhk earned 200 total points
ID: 12382712
yes. you can override and do whatever u want in the child class. thats the reason u extend a class and override a method to get some completely different operations done.

you can check out this link for the details

http://www.holtsoft.com/java/resources/inherit_tutorial/Inheritance/Inheritance.html


http://www.cs.wisc.edu/~solomon/cs537/java-tutorial.html
0
 

Author Comment

by:smkJackstraw
ID: 12382742
Yes, thanks for the links in your previous post.  I read that and just wanted to make sure I understood what I was reading.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question