Java Equivalent of C# ArrayList -



Java Equivalent of C# ArrayList -

this question has reply here:

arraylist raw type. references generic type arraylist<e> should parameterized 3 answers

i'm converting c# code java code.

arraylist used in c# code.

should straight utilize arraylist in java code c# arraylist?

when straight use, warning :

arraylist raw type. references generic type arraylist should parameterized.

what changes should do?

my c# arraylist :

private system.collections.arraylist _lines = new system.collections.arraylist(); public system.collections.arraylist lines { { homecoming lines; } }

thanks.

if want create more or less 1 1 conversion, can utilize arraylist<object>:

arraylist<object> arraylist = new arraylist<object>();

it allow convert code without major rewrite.

but i'd recommend utilize generic version of appropriate collections, whether in java or c# code. determine type of lines stored in list , utilize type parameter of generic collection:

arraylist<line> arraylist = new arraylist<line>();

java c# arraylist

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -