![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bug
北朽暖栀24
这个作者很懒,什么都没留下…
展开
-
Address already in use: JVM_Bind(JAVA网络编程遇到的bug)
这时候是你指定的端口已经被占用了,换成其他端口号就行。原创 2020-05-25 19:21:08 · 118 阅读 · 0 评论 -
no tests found with test runner JUnit5
将导入的import org.junit.jupiter.api.Test;换成import org.junit.Test;原创 2020-05-24 08:58:48 · 376 阅读 · 0 评论 -
java.lang.NullPointerException
例子: if(q!=null&&q!=null)这时候就会抛出错误原创 2020-03-17 15:31:04 · 70 阅读 · 0 评论 -
Bad operand types for binary operator ‘&&’
例子if(p==null && q=null)这里就会出现上述的报错,因为&&的左边是boolean类型,右边是其他类型原创 2020-03-17 15:21:31 · 547 阅读 · 0 评论 -
java bug: unreachable statement
unreachable statement表明这个语句不可以达到,不可能被执行出现原因:在执行这个语句前已经返回了 public final TreeNode getTargetCopy(final TreeNode original, final TreeNode cloned, final TreeNode target) { if (original == null){...原创 2020-03-15 18:41:38 · 335 阅读 · 0 评论 -
bug:The method addfirst(int) is undefined for the type LinkedList<Integer>
LinkedList output = new LinkedList<>();output.addfirst(a.val);这样写然后报错了原因addfirst(),是addFirst(),而非addfirst();注意这种细节。原创 2020-03-14 12:50:36 · 691 阅读 · 0 评论 -
debug:cannot find symbol
这种debug一般是某个变量没有定义,或者定义成其他名字了原创 2020-03-11 08:44:24 · 312 阅读 · 0 评论 -
java.lang.ArrayIndexOutOfBoundsException:0
这种情况是数组越界了,一个数组array的范围是[0,array.length-1];原创 2020-03-13 10:42:14 · 7915 阅读 · 0 评论 -
java Multiple markers at this line
这个错误一般是函数里嵌套了函数。或者是类里面没有函数头直接写函数体了。public class GoldCoin extends Coin{ super("国庆节专属金币" ,98, 1, 200);}这样就是错的应该改为public class GoldCoin extends Coin{ public GoldCoin() { super("国庆节专属金币"...原创 2020-03-12 18:17:04 · 653 阅读 · 0 评论 -
Syntax error on token "Invalid Character", delete this token
Syntax error on token “Invalid Character”, delete this token ,这个是出现了非法字符。解决办法:1.检查标点符号等2.有可能是格式改变了,不是utf-8了,可以将java文件复制,转为utf-8。或者直接将有问题的行全部删除,重新写一遍。...原创 2020-03-12 18:13:12 · 6253 阅读 · 0 评论