No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
im having a bit of trouble using the object i add to my arraylist. i used this as my reference: [url]http://www.java2s.com/Tutorial/CSharp/0220__Data-Structure/ArrayListandyourownobjectAddobjectstoArrayList.htm[/url] [CODE] import java.util.ArrayList; public class TestArrayList { public static void main(String[] args) { Object item1 = new ObjectMaker(); Object item2 = new ObjectMaker(); Object item3 = new ObjectMaker(); ArrayList<Object> … | |
I have this homework assignment to make a calculator using a stack and converting infix to postfix. My infix to postfix method works fine. But the other method to evaluate it works for all cases except when multiples or divisors result in double digits. My calculator does not support double … | |
I was assigned to make a int to binary converter. I made one and it work as it should however when attempting to make a char pointer and print the char array the pointer is pointing to it print weird character which I am guessing is the memory location. Am … | |
This program keeps adds the sum of numbers you put in. You can also quit by typing in quit, its not case sensitive since I have code which converts all uppercase letters into lowercase. This in fact is the problem. For some reason when I insert a number it works … | |
This bug is killing me. I have no idea what I did wrong. My friend has it the exact same way. This program reads a txt file and reads each line which has a request in it EX: Matt Smith;Event 1;2009;March;29;11;120;40; We take the request cut it up according to … | |
Im playing around with the clone method of arraylist and have a few questions. This is what i did with it: [CODE] ObjectMaker item1 = new ObjectMaker(); ObjectMaker item2 = new ObjectMaker(); ObjectMaker item3 = new ObjectMaker(); ArrayList<ObjectMaker> arrayList = new ArrayList<ObjectMaker>(); arrayList.add(item1); arrayList.add(item2); arrayList.add(item3); Object theList = arrayList.clone(); [/CODE] … | |
What is the difference between makin an ArrayList these two difference ways? i know the method will be the same and both will essentially do the same thing. but why two ways to initializing arraylist? [CODE] ArrayList<String> list = new ArrayList<String>(); List<String> myList = new ArrayList<String>(); [/CODE] | |
this code doesnt work, as in it only asks the user for getchar once and putchar once. i tried putting it in two method and it didnt work either. also whether it be char or int it is the same. that leads me to another question. why is it allowed … |