如何创建,使用和实现接口和抽象类 [英] how to create,use and implement interface and abstract class

查看:100
本文介绍了如何创建,使用和实现接口和抽象类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,

我在使用界面和摘要方面遇到了问题。让我们简要介绍一下我的情况。我有一个接口名称是帐户,其中我有一些抽象类名称实现的抽象方法是AccountImpls。现在我想通过类AccountFactory使用帐户界面,其中我创建了一个方法CreateAccount,其中帐户界面作为返回类型。因此,当我创建Account接口类的对象时,它会自动实现account类中的所有抽象方法。现在任何人都可以帮助我,我该如何实现这些方法?或者任何人都有这类问题的例子?我有一个uml图表,但我怎么能告诉你这个?如果还有任何想法,请告诉我吗?

提前谢谢.....

dear friends,
I have a problem in using interface and abstract. let's give you brief details what i have. I have an interface name is "Account" in which i have some abstract methods which implemented by abstract class name is "AccountImpls". now i want to use "Account" interface by class "AccountFactory" in which i create a method "CreateAccount" that have "Account" interface as a return type. So when i create object of "Account" interface class then it's automatic implement all the abstract method which inside the "account" class. now can any one please help me that how can i implement that methods? or any one have any examples for that type of problems? I have a uml diagram of that but how can i show you by this? if any idea than tell me for that also?
Thank you in advance.....

推荐答案

检查这些:



http://docs.oracle。 com / javase / tutorial / java / IandI / usinginterface.html [ ^ ]



http://www.tutorialspoint.com/java/java_interfaces.htm [ ^ ]



请仔细阅读,希望它有助于清除您的概念。



Azee ......
Check these out:

http://docs.oracle.com/javase/tutorial/java/IandI/usinginterface.html[^]

http://www.tutorialspoint.com/java/java_interfaces.htm[^]

Do a thorough reading, hope it helps clear your concepts.

Azee...


这篇关于如何创建,使用和实现接口和抽象类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆