Well, to be more specific, EVERYTHING in an ArrayList gets stored as an object. The ArrayList is kind of like an Array that you can add objects to after you've instantiated it.
The ArrayList even has methods that you can use to convert the ArrayList to an Array. But, if you try to convert an ArrayList of objects that won't convert or cast to the type you're specifying to convert to, I imagine you'll get an exception thrown...
Me neither :)
List<T> is best option. Maybe for some "simple" arrays its better to use a simple array, like string, or int. But if you have a custom object, List is better choice, and even better is a generic list (List<T> - as Momerath described in the previous post).
The difference is that you perform boxing/unboxing (throwing the string to question and bad habit verca) with Arraylist, and nonexclusive List<string> permits you to dodge it. Execution of non specific classes is better.
I need to comput and display the sum and average of the cubes of the even natural numbers between 2 and n. Where n is entered by the user. Im stuck on how to average the sum of the cubes. Help Please. This is what I have so far.