Java & OO Intermediate - Part 2

Inheritance
  • Given a class hierarchy, identify parents and children
  • Use the correct Java syntax for extending a class.
  • Write expressions that upcast or downcast a reference (no tricks, no arrays).
Object
  • Know that java.lang.Object is the ultimate ancestor.
  • Identify methods inherited from the Object class.
  • Write correct implementation of the toString() method.
Overriding
  • Explain the overriding mechanism and late binding
  • From given code including a late binding call, predict the method that will be called.
  • Identify correct overriding syntax, distinguish between the overriding and overloading mechanism.
Abstract
  • Write code that declares abstract classes and methods
  • Understand that an abstract class cannot be instantiated
  • Know that once a class contains an abstract method, it must be marked as abstract.
Interfaces
  • Write code that declares an interface and its containing methods.
  • Make a class implement an interface correctly.
  • Explain the particular nature of attributes declared in interfaces.
  • Identify differences between implementing an interface and extending a class.
  • Know that all methods of an interface are public.

instanceof
  • Write code that uses the instanceof operator for run-time type identification.
  • Identify correct operands of the instanceof operator
Access modifiers
  • From a given situation, predict if a method can access a class attributes/methods, whatever of the 4 access modifiers are applied on these attributes/methods.
  • Select the appropriate access modifier to enable a class to access or not access an attribute/method.
Overloading
  • Implement constructor an method overloading correctly.
  • Know that two methods cannot differ only on the return type.
Annotation
  • Use the @Override annotation
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值