Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

abstract method in lab 4?

3462211May 25 2017 — edited Jun 1 2017

Hi Nick,

I have 2 more questions regarding lab 4.  I guess I don't quite comprehend your code.

1) In "Account.java"

public  abstract  String  getAccountType();

Is above line of code "getAccounType()" an abstract method you mentioned in the video/slides?

If it is, what's the point of declare a method without performing any function?

2) In both "CheckingAccount.java" and "SavingsAccount.java"

What's the point of declare "getAccountType()" method in abstract Account class when both CheckingAccount and SavingsAccount declare their own method without using "super" keyword?

public  String  getAccountType() {

     return  accountType;

}; 

Thanks,

Carol

Comments

Post Details

Added on May 25 2017
7 comments
408 views