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 answersi'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
Post a Comment