--following with another section of sorted words--
words.add("count");
words.add("cvs");
words.add("dce");
words.add("depth");
--following with another section of ...
Hi, I'm new to java i'm having a problem assigning a string from a string list. the code, gets a random number and chooses a sex, m/f if female tries to assign a name based on a list of girlnames otherwise a list of boynames. error: method girlNames(int) is undefined... I haven't used List before so I'm not quite sure how ...
As the API documentation for asList() explains, it "Returns a fixed-size list backed by the specified array." By fixed-size they mean that you cannot add values the way you are trying to do. If you want to add values to your collection of ints, is there some reason why you are using an int[] array in the first place? You create ...
ActionListener listener1 = new button1Listener(); button1.addActionListener(listener1); ActionListener listener2 = new button2Listener(); button2.addActionListener(listener2); } private static boolean line; private static boolean circle; private static int x1; private static int y1; private static int x; private static int q; } on the bold part the compiler gives an error saying "array required, but java.util.ArrayList found i do have a point class and it ...