随笔分类 - java
摘要:package stream; import java.io.*; /** * @author*/ public class TestStream { public static void main(String[] args) throws IOException { // ***********
阅读全文
摘要:1:右击项目工程名称2:Properties3: Jvav Build Path4: Libraries5: Add External JARS6: 找到“E:\apache-tomcat-9.0.43\lib\servlet-api.jar” 7:添加既可
阅读全文
摘要://在post提交的页面顶部插入下列代码 <% request.setCharacterEncoding("UTF-8"); %>
阅读全文
摘要:应用 :求面积 1,抽象类 Geometry . public abstract class Geometry { public abstract double getArea(); } 2,矩形 Rect public class Rect extends Geometry{ double a,b
阅读全文
摘要:Integer.valueOf("str").intValue(); Integer.valueOf("123").intValue();
阅读全文
摘要:int n= 1234; System.out.println(n%10 ); //获取个位 System.out.println((n/10)%10 ); //获取十位 System.out.println((n/100)%10 ); //获取百位 System.out.println((n/10
阅读全文
摘要:package list; import java.util.ArrayList; import demo.Hero; public class ListTs { public static void main(String[] args) { ArrayList<Object> list = ne
阅读全文
摘要:package stream; import java.io.*; public class InputStreamReaderString { public static void main(String[] args) { File f = new File("src/stream","hell
阅读全文
摘要:package stream; import java.io.*; public class FileReaderTest { public static void main(String[] args) { File f = new File("src/stream","hello.txt");
阅读全文
摘要:package filerun; import java.io.File; import java.io.IOException; public class RunExe { public static void main(String[] args) { // TODO Auto-generate
阅读全文
摘要:package practice; import java.io.File; import java.io.IOException; public class CreateFile { public static void main(String[] args) { File f = new Fil
阅读全文
摘要:1,在 java project 目录下新建 lib 文件夹 2,将 mysql 的 jar 包 复制到 新建的 lib 文件夹 3,选中 lib 下的 jar 包 , 右键点击选择 build path 点击 选择 add to build path 4, 完成add to build path
阅读全文