Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Usage of Arraylists in Java

Reply
Thread Tools

Usage of Arraylists in Java

 
 
Weasley
Guest
Posts: n/a
 
      12-09-2009
Hello Friends,

I wrote a function yesterday, and defined an String array there. I
defined it like,

String[] arr = null;

No error was shown by my IDE. I thought to move ahead. But when I
tried to increase the size of my array, I was caught.

Now I learned the difference b/w Array & an Array List.

Read more .. http://www.ezdia.com/How_to_use_Arra...ent.do?id=1022
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      12-09-2009
In article
<aa5984d2-40a3-45e9-9870->,
Weasley <> wrote:

Perhaps you meant this:

<http://www.java-samples.com/showtutorial.php?tutorialid=234>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
 
Marcin Rze¼nicki
Guest
Posts: n/a
 
      12-09-2009
On 9 Gru, 10:03, Weasley <samyaksul...@gmail.com> wrote:
> Hello Friends,
>
> I wrote a function yesterday, and defined an String array there. I
> defined it like,
>
> String[] arr = null;
>
> No error was shown by my IDE.


Because there is no error in this line. Initializing reference to null
is always valid.

I thought to move ahead. But when I
> tried to increase the size of my array, I was caught.
>


??

> Now I learned the difference b/w Array & an Array List.
>
> Read more ..http://www.ezdia.com/How_to_use_Arra...ent.do?id=1022


??
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      12-09-2009
On Wed, 9 Dec 2009 01:03:35 -0800 (PST), Weasley
<> wrote, quoted or indirectly quoted someone
who said :

>String[] arr = null;
>
>No error was shown by my IDE. I thought to move ahead. But when I
>tried to increase the size of my array, I was caught.
>
>Now I learned the difference b/w Array & an Array List.


That does not make sense. You did not allocate your array, so you
can't very well talk about increasing its size.

See http://mindprod.com/jgloss/array.html
http://mindprod.com/jgloss/arraylist.html

--
Roedy Green Canadian Mind Products
http://mindprod.com
The future has already happened, it just isn’t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 61)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrays and Arraylists in Java Weasley Javascript 1 12-09-2009 03:25 PM
Comparing two arraylists =?Utf-8?B?RE9UTkVUR1VZ?= ASP .Net 1 08-24-2005 10:17 AM
binding ArrayLists to DataGrids-- how to name the columns? Jim Bancroft ASP .Net 3 05-02-2005 08:54 PM
an Array of ArrayLists in Java 5 Gary Newell Java 2 12-14-2004 03:32 PM
ArrayList of ArrayLists: How to implement IEnumerable =?Utf-8?B?UG9udGlNYXg=?= ASP .Net 0 07-05-2004 02:12 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57