java base 1

  1. What are immutable objects most useful in?
    Concurrent applications

  2. How do you create a new class that maps keys to values using the Collections Framework?
    Extend from AbstractMap to implement the Map interface

  3. Given:
    public abstract class Animal{…}
    public class Dog extends Animal{…}
    What allows you to use a parent class reference to refer to a child class object? For example:
    Animal animal = new Dog();

Polymorphism 多态 /,pɒlɪ’mɔːfɪz(ə)m/

  1. What effect does declaring a method as final have?
    The method cannot be overridden in subclasses.

  2. What does the Object.wait() method do?
    Causes the current thread to wait

  3. How can you stop your class from being inherited by another class?
    Declare the class as final.

  4. Between the following options, which is the most efficient way to concatenate a large number

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值