码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2011年5月26日

摘要: Types of PolymorphismStatic Polymorphism Method overloading It uses the concept of compile time bindingMethod is invoked based on the reference typeDynamic Polymorphism Method overriding It uses the concept of late binding or runtime bindingMethod is invoked based on the object typeThe words compile 阅读全文
posted @ 2011-05-26 17:08 海山 阅读(177) 评论(0) 推荐(0)

摘要: Q. What are the different things that can be static ?static can be variable block method Static variablesStatic variables are Class variables private static int counter ; // creates a class variableprivate int index; //creates an instance variable They are initialized when the class gets loadedStati 阅读全文
posted @ 2011-05-26 17:06 海山 阅读(196) 评论(0) 推荐(0)

摘要: ØUsed to expose or hide the details/attributes in a class§Public–A declaration that is accessible to all classes§Protected–A declaration that is accessible to only to the class itself and its subclasses§Private–A declaration that is accessible to only to the class itselfPublic 可以 阅读全文
posted @ 2011-05-26 09:17 海山 阅读(209) 评论(0) 推荐(0)