Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.Collections; // ovo ne treba uopste zapravo :p
- public class ArejLista {
- public static void main (String[] args) {
- ArrayList<String> bolidi = new ArrayList<String>();
- bolidi.add("McLaren Honda MP4/4");
- bolidi.add("Ferrari F2002");
- bolidi.add("Renault R25");
- bolidi.add("RedBull Honda RBPT RB19");
- bolidi.add("StefanGP Toyota TF101");
- bolidi.add("BrawnGP Mercedes BGP-001");
- bolidi.remove(3);
- System.out.println(bolidi);
- System.out.println("\nNajjaci bolid: " + bolidi.get(3));
- System.out.println();
- Collections.sort(bolidi);
- for (String i : bolidi){
- System.out.println(i);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement