字节流 @PostMapping("/downloadExcel") public ResponseEntity<byte[]> downloadExcel() throws Exception { // Excel文件名 String fileName = "StockInfo.xlsx"; // 使用ByteArrayOutput…
catch 中添加如下代码 StackTraceElement[] stackTraceElements = e.getStackTrace(); StackTraceElement element = stackTraceElements[0]; return Result.fail("400", element.getLineN…
public class HelloJava { public static void main(String[] args) { System.out.println("Hello Java Simple"); Teacher t = new Teacher(); System.out.println(t); //Student s = …
package top.qaqaq.java.P711; import org.junit.jupiter.api.Test; import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequ…
package top.qaqaq.java.P708; import org.junit.jupiter.api.Test; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.util.ArrayLis…
package top.qaqaq.java.P704; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import j…
package top.qaqaq.java.P702; import org.junit.jupiter.api.Test; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputS…
package top.qaqaq.java.P698; /** * @author RichieZhang * @create 2022-11-05 上午 11:52 */ public class MyInterfaceImpl implements MyInterface{ @Override public void methodAbstra…
/** * @author songhongkang * @create 2019 下午 11:51 * */ public void printHello() { System.out.println("马上建国70周年了,祝祖国母亲生日快乐!"); } printHello(); jshell
package top.qaqaq.java.P697; import org.junit.jupiter.api.Test; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import jav…
package top.qaqaq.java.P696; import top.qaqaq.java.P696.bean.Person; /** * @author RichieZhang * @create 2022-11-05 上午 10:56 */ public class ModuleTest { public static void ma…
这篇文章没有摘要
package top.qaqaq.java.P685; import org.junit.jupiter.api.Test; import java.util.Optional; /** * Optional类:为了在程序中避免出现空指针异常而创建的。 * * 常用的方法:ofNullable(T t) * orElse(T t) * * @au…
package top.qaqaq.java.P677; import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; import java.util.stream.Stre…
package top.qaqaq.java.P673; import org.junit.jupiter.api.Test; import java.io.PrintStream; import java.util.Comparator; import java.util.function.BiPredicate; import java.uti…
package top.qaqaq.java.P672; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Consumer;…
package top.qaqaq.java.P669; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Comparator; import java.util.function.Consumer; /** * Lambda表达式的使用…
package top.qaqaq.java.P668; import org.junit.jupiter.api.Test; import java.util.Comparator; /** * Lambda表达式的使用举例 * * @author RichieZhang * @create 2022-11-03 下午 3:08 */ publi…
function f(){ return 1; }; print(f() + 1);
学习的思维方式: 1. "大处着眼,小处着手" 2. 逆向思维、反证法 List<String> list2; List<Object> list1 = list2; 3. 透过问题看本质 两句话: 1. 小不忍则乱大谋 2. 识时务者为俊杰