funxus
Orange Cycloptic Blob
I'm kind of a newbie when it comes to java, but I'm not too bad. From what I've heard C/C++ is much better, and beats java in the long run, I think you make java a bit to hard though in your array example. What's wrong with this code:Originally posted by Sirp
That's okay: a year later Java still sucks
When I programmed in Java, it just made it incredibly irritating to do all the things you typically want to do in a program. Say you want to store a whole heap of integers, in a long list, populating the list and then perhaps performing operations on it.
Code:
int[] a = {1, 2, 3, 4, 5};
System.out.println(a[1]);
It does the same thing, only using the data type int instead of the class Integer. If you dynamically want to add numbers to an int array, the code isn't worse than this:
Code:
int[] b = new int[4];
for (int i = 0;i<b.length;i++){
b[i]=(i+1)*2;
}
System.out.println(b[1]);
