I have an arrayList where I have entered some strings (names). The assignment is pretty simple but I have no idea how to do it. We have to make a program that will print out a random String in the console from the list.
I've come this far:
ArrayList <String> p = new ArrayList <String> ();
Random ran = new Random ();
p.add("Petter");
p.add("Per");
p.add("Mohammed");
System.out.println(p.get(ran.next));