29 lines
626 B
Plaintext
29 lines
626 B
Plaintext
import java.util.ArrayList;
|
|
public class Al {
|
|
public static void main(String args[]) {
|
|
|
|
ArrayList<Double> noten = new ArrayList();
|
|
|
|
noten.add(5.6);
|
|
|
|
if(noten.contains(5.6)) {
|
|
System.out.println("Ture");
|
|
|
|
}
|
|
else {
|
|
System.out.println("False");
|
|
} // end of if-else
|
|
for (int i = 0; i<25 ;i++ ) {
|
|
noten.add(Math.ceil((Math.random() * 10)));
|
|
|
|
} // end of for
|
|
|
|
System.out.println(noten.get(5));
|
|
System.out.println(noten);
|
|
System.out.println(noten.size());
|
|
System.out.println(noten.remove(0));
|
|
System.out.println(noten);
|
|
|
|
}
|
|
|
|
} |