zoukankan      html  css  js  c++  java
  • 最近遇到的异常与错误总结

    异常
    NumberFormatException  数字格式化异常
    ArithmeticException 算术异常
    ArrayIndexOutOfBoundsException  数组超出绑定异常:没有输入参数,或输入的参数不够
    NullPointerException 空指针异常:使用了未实例化的对象
    NoSuchMethodError:main  找不到主方法
    ClassCastExeption:A 类转换异常
    IllegalThreadStateException:非法的线程状态异常
    IOException: IO流异常


    错误
    integer number too large
    name has private access in Person 无法访问封装属性
    call to this must be first statement in constructor  错误的调用,只能放在构造方法的首行
    recursive constructor invocation 递归调用了构造方法
    non-static variable name cannot be referenced from a static context  不能调用非static属性
    non-static method fun() cannot be referenced from a static context 不能调用非static方法
    Singleton() has private access in Singleton 无法实例化
    print() in Student cannot override print() int Person; attempting to assign weaker access privileges; was public 覆写父类中的方法,便缩小了权限,错误
    cannot inherit from final A
    print() in B cannot override print() in A; overridden method is final
    cannot assign a value to final variable INFO
    OutOfMemoryError:

  • 相关阅读:
    sort排序
    js数组
    json数据格式 与 for in
    js 定时器
    鼠标滚轮事件
    cookie
    POJ 2387 Til the Cows Come Home
    POJ 1459 Power Network
    HDU 5389 Zero Escape
    HDU 5387 Clock
  • 原文地址:https://www.cnblogs.com/huguangqin/p/7124020.html
Copyright © 2011-2022 走看看