摘要: 子类引用可以赋值给父类引用,父类引用需要类型转换才能赋值给子类引用。 1从子类强制类型转换为父类时需要使用instanceof if(staff[i] instanceof Manager){ boss=(Manager)staff[i]; ... } 5.2 Object类 Object 类是所有 阅读全文
posted @ 2025-01-15 15:51 zhongta 阅读(8) 评论(0) 推荐(0)
摘要: 1.溢出 <!DOCTYPE html> <html> <head> <style> p.test1 { white-space: nowrap; width: 200px; border: 1px solid #000000; overflow: hidden; text-overflow: cl 阅读全文
posted @ 2025-01-15 13:37 zhongta 阅读(14) 评论(0) 推荐(0)