好記性不如賴筆頭…… 注意:InputStream/OutputStream是抽象類別,不能被執行個體化,只能執行個體化其子類,且是位元組流,不是字元流 InputStream is = new FileInputStream(“a.txt”); 等同於 InputStream is = new FileInputStream(new File(“a.txt”)); OutputStream類似與之類似, package
今天在使用maven打包項目的時候,報了以下異常: [ERROR] error: java.lang.StackOverflowError[INFO] at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5365)[INFO] at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5472)[INFO] at
public class CircleRectangleIntersect { private StringBuffer ntersectInformation = new StringBuffer(); public StringBuffer getNtersectInformation() { return ntersectInformation; } public void setNtersectInformation(StringBuffer ntersectInformation) {
牛客網測試地址:https://www.nowcoder.com/questionTerminal/567f420f12ed4069b7e1d1520719d409 leetcode地址:https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/#/description 題目: 80. Remove Duplicates from Sorted Array II Follow up
還是從代碼中根據執行個體進行分析線程的中斷: package LyfPractice;/** * Created by fangjiejie on 2016/12/15. */public class SThread {}class S extends Thread{ @Override public void run() { for(int i=0;i<1000;i++){ if(i==100){// 1.
理解join()方法 首先先看一個例子: public class JoinDemo implements Runnable { private static int n = 0; public void run() { for (int i = 0; i < 5; i++) { n += 1; } } public static void main(String[] args) { T