随笔分类 - java
摘要:public class Numeric { public static void main(String[] args) { String string = "-1234.15"; boolean numeric = true; numeric = string.matches("-?\\d+(\\.\\d+)?"); ...
阅读全文
摘要:import java.util.HashMap; import java.util.Iterator; public class JavaHashMap { public static void main(String[] args) { //定义HashMap HashMap hm = new HashMap(); //添加字典 hm.put("username...
阅读全文
摘要:public class BubbleSort { public static void main(String[] args) { //排序数组 int[] intArray = {12, 11, 45, 6, 4, 8, 43, 40, 57, 3, 22}; System.out.println("排序前的数组:"); for (int i = 0; i < ...
阅读全文
摘要:1、下载jdk8 登录网址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 选择对应jdk版本下载 2、解压 3、然后将文件夹jdk1.8.0_144移动到目录/opt下 4、修改
阅读全文
摘要:下载:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 安装安装包。 双击安装即可! 设置环境变量: 一.JAVA_HOME 新建环境变量JAVA_HOME 变量名:JAVA_HO
阅读全文