上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页
摘要: 其实这个问题是由于MySQL 这个jar 包依赖类型默认是runtime ,也就是说只有运行时生效,所以虽然这里报错,但是不影响你代码运行。 解决方案: 将runtime 修改为Compile 即可 将runtime 修改为Compile 即可 阅读全文
posted @ 2019-05-28 20:06 keepup~ 阅读(13231) 评论(0) 推荐(0) 编辑
摘要: 解决:鼠标悬于上方Alt + Enter 选择Ignore 阅读全文
posted @ 2019-05-28 19:36 keepup~ 阅读(238) 评论(0) 推荐(0) 编辑
摘要: undefined表示"缺少值",就是此处应该有一个值,但是还没有定义。典型用法是: (1)变量被声明了,但没有赋值时,就等于undefined。 (2) 调用函数时,应该提供的参数没有提供,该参数等于undefined。 (3)对象没有赋值的属性,该属性的值为undefined。 (4)函数没有返 阅读全文
posted @ 2019-05-26 21:17 keepup~ 阅读(221) 评论(0) 推荐(0) 编辑
摘要: /** * 斐波那契数列 */public static int fib(int n){ if(n==1) return 0; if(n==2) return 1; return fib(n-1) + fib(n-2);} 阅读全文
posted @ 2019-05-13 12:28 keepup~ 阅读(96) 评论(0) 推荐(0) 编辑
摘要: /** * 单例模式:懒汉式 */class Singleton{ private static volatile Singleton singleton = null; private Singleton(){ } public static Singleton getInstance(){ if 阅读全文
posted @ 2019-05-13 12:05 keepup~ 阅读(116) 评论(0) 推荐(0) 编辑
摘要: /** * 冒泡排序 * @param arr */public static void bubbleSort(int [] arr){ for(int i= 0;i < arr.length -1;i++){ for (int j=0;j < arr.length-1-i;j++){ if(arr 阅读全文
posted @ 2019-05-13 12:04 keepup~ 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1. 下面哪些是Thread类的方法() A start() B run() C exit() D getPriority() 答案:ABD 解析:看Java API docs吧:http://docs.oracle.com/javase/7/docs/api/,exit()是System类的方法, 阅读全文
posted @ 2019-05-09 23:14 keepup~ 阅读(492) 评论(0) 推荐(0) 编辑
摘要: public class ManyThreads2 { private int j = 0; public synchronized void inc() { j++; System.out.println(Thread.currentThread().getName() + "inc" + j); 阅读全文
posted @ 2019-05-09 18:54 keepup~ 阅读(905) 评论(0) 推荐(0) 编辑
摘要: public static void test(String str){Map<String,Integer> map = new HashMap<>();for(int i = 0 ;i < str.length();i++){String s = str.charAt(i) + "";if(ma 阅读全文
posted @ 2019-05-09 18:07 keepup~ 阅读(3195) 评论(0) 推荐(0) 编辑
摘要: public String reverse(String str){ if(str == null || str.length() <= 1){ return str; } return reverse(str.subString(1)) + str.charAt(0); } 阅读全文
posted @ 2019-05-09 17:17 keepup~ 阅读(4363) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页