由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: How to use abstract class?
相关主题
看了zhaoce073大水忍不住说2句Timer and TimerTask
问题征解jvm是怎么implement monitor的?
[合集] Java interview question, Thanks.interface和implementation class
泛型问题Re: 初级问题
abstract class 的简单例子Re: question
三论abstract classRe: Why my url can not open a connection to my servlet in a web browse
can applet implements runnable?Re: 如何在两个窗口之间通信?
问一个特别土的问题Java interview Question(31-50)
相关话题的讨论汇总
话题: abstract话题: class话题: use
进入Java版参与讨论
1 (共1页)
o**d
发帖数: 11
1
OK. Since it is a ABSTRACT class, it is not possible to
instantiate it. What you need to do is to create a a
subclass to FontMetrics, which implements all the abstract
methods in FontMetrics. Then you could write code like:
FontMetrics myMetrics = new FontMetricsSubClass(newfont);
If you have an abstract method in FontMetrics, say
myMethod(). When you call myMentrics.myMethod(), it will
find the real object it points to and run the implementation
in FontMetricsSubClass. It is called dynamic bind
1 (共1页)
进入Java版参与讨论
相关主题
Java interview Question(31-50)abstract class 的简单例子
Core Java2 Notes (4)三论abstract class
菜鸟问题can applet implements runnable?
请问protected的使用问一个特别土的问题
看了zhaoce073大水忍不住说2句Timer and TimerTask
问题征解jvm是怎么implement monitor的?
[合集] Java interview question, Thanks.interface和implementation class
泛型问题Re: 初级问题
相关话题的讨论汇总
话题: abstract话题: class话题: use