阅读背景:

如何从arraylist中的对象中提取特定数据

来源:互联网 

Ok, not sure if the title worded that correctly but say I have three objects with two strings of data each(Lets say a stateName and a cityName) stored into an arraylist. Is it possible to enter in a state name in as a string variable(call it searchStateName), then have a method search through the objects in the list and compare searchStateName to the stateName inside each object in the arraylist, and when a match is found have it return the cityName that is inside the same object as the matching stateName?Ok, not sure if the title worded that correctly




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: