sudhakar_koundinya
asked on
Efficiency of typecasting
Hi All,
I just get the doubt. Could you please clarify that
java.util.List contains either strings or my own defined class instances
now when I try to type cast them to Array, will it reduce the efficiency of method??
I am type casting like this. List's size may vary from 1 to 100000
(String[])list.toArray(new String[0]);
or
(IWdHttpRefernce[])list.to Array(new IWdHttpRefernce[0]);
I just get the doubt. Could you please clarify that
java.util.List contains either strings or my own defined class instances
now when I try to type cast them to Array, will it reduce the efficiency of method??
I am type casting like this. List's size may vary from 1 to 100000
(String[])list.toArray(new
or
(IWdHttpRefernce[])list.to
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it should not, you are now making different kind of reference to the object.