编程
tingting256
这个作者很懒,什么都没留下…
展开
-
Java中List删除
Iterator it = list.iterator();intindex = 0;while(it.hasNext()){ Object obj = it.next(); if(needDelete(obj)) //needDelete返回boolean,决定是否要删除 {转载 2015-09-06 20:54:16 · 590 阅读 · 0 评论 -
关于JAVA中if表达式中的赋值语句
例一:public static void main(){boolean x=false;if(x=true){System.out.print(x);}}注意:这是编译可以通过的,会打印出true;例二:public static void main(){int x=0;if(x=1){System.out.print(x);}原创 2015-09-06 20:36:33 · 8867 阅读 · 0 评论 -
leetcode:Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in wordsexactly once and w原创 2015-09-07 15:37:39 · 435 阅读 · 0 评论