62,614
社区成员
发帖
与我相关
我的任务
分享
public static boolean isOdd(int i){
return i % 2 == 0;
}
System.out.println(2.0-1.9);
System.out.println(2.0-1.9);
int x = 2010;
int y = 2012;
x^=y^=x^=y;
System.out.println("x= " + x + "; y= " + y);
System.out.println("H" + "a");
System.out.println('H' + 'a');
public static final int END = Integer.MAX_VALUE;
public static final int START = END - 100;
public static void main(String[] args) {
int count = 0;
for (int i = START; i <= END; i++)
count++;
System.out.println(count);
}
int minutes = 0;
for (int ms = 0; ms < 60*60*1000; ms++)
if (ms % 60*1000 == 0)
minutes++;
System.out.println(minutes);
public static boolean decision() {
try {
return true;
} finally {
return false;
}
}
public static void main(String[] args) {
Vector v = new Vector();
v.add("one");
v.add("two");
v.add("three");
v.add("four");
Enumeration enume = v.elements();
while (enume.hasMoreElements()){
String s = (String) enume.nextElement();
if (s.equals("two"))
v.remove("two");
else{
System.out.println(s);
}
}
System.out.println("What's really there...");
enume = v.elements();
while (enume.hasMoreElements()){
String s = (String) enume.nextElement();
System.out.println(s);
}
}