27 lines
299 B
Java
Executable File
27 lines
299 B
Java
Executable File
import java.util.Vector;
|
|
|
|
public class TestIfStmt {
|
|
|
|
public m1() {
|
|
a;
|
|
if (a) {
|
|
return a;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
public m2() {
|
|
a;
|
|
c;
|
|
a = new Vector<Integer>();
|
|
if (a.isEmpty()) {
|
|
c="empty";
|
|
}
|
|
else if (a.size()==1) {
|
|
c="almost empty";
|
|
}
|
|
else
|
|
return a;
|
|
}
|
|
} |