比较两个ArrayLists [英] compare two ArrayLists
问题描述
朋友们,我需要一些关于我的java程序的输入。我的程序应该在每个运行时将3个信息存储到ArrayList所谓的arrayOne中:
1.唯一ID
2.布尔值
3.数据。
假设我给第一个输入a = 5,编译& run:Result - arrayOne。
秒输入a = 24,编译& run:Result - arrayOne。
目标:在运行后比较这两个结果数组。
如何提取结果&在运行时之后比较这两个结果数组,可以自动检查数据和数据。布尔值?
请告知我发布我的程序然后...
Friends, I need some inputs about my java program. My program is supposed to store 3 information into an ArrayList so-called arrayOne at each runtime:
1. Unique ID
2. Boolean Value
3. data.
Let''s assume I give first input a = 5, compile & run: Result - arrayOne.
Second Input a = 24, compile & run: Result - arrayOne.
Aim: To compare these two result arrays after runtime.
How to extract the results & compare these 2 result arrays after runtime that can automatically check the data & boolean value?
please advise and I''ll post my program then...
推荐答案
朋友们,我需要一些关于我的java程序的输入。我的程序应该在每个运行时将3个信息存储到ArrayList所谓的arrayOne中:
1.唯一ID
2.布尔值
3.数据。
假设我给第一个输入a = 5,编译& run:Result - arrayOne。
秒输入a = 24,编译& run:Result - arrayOne。
目标:在运行后比较这两个结果数组。
如何提取结果&在运行时之后比较这两个结果数组,可以自动检查数据和数据。布尔值?
请指教,我会发布我的程序然后...
Friends, I need some inputs about my java program. My program is supposed to store 3 information into an ArrayList so-called arrayOne at each runtime:
1. Unique ID
2. Boolean Value
3. data.
Let''s assume I give first input a = 5, compile & run: Result - arrayOne.
Second Input a = 24, compile & run: Result - arrayOne.
Aim: To compare these two result arrays after runtime.
How to extract the results & compare these 2 result arrays after runtime that can automatically check the data & boolean value?
please advise and I''ll post my program then...
如果你想要结果程序退出后,你需要将结果写入文件或数据库。
If you want the results after the program has exited then you need to write the results to a file or database.
如果你想在程序后有结果退出然后你需要将结果写入文件或数据库。
If you want the results after the program has exited then you need to write the results to a file or database.
请给我一些关于如何将结果写入文件的指针..
并比较它们...至少任何网页为了我的阅读..非常感谢
Please give me some pointer on how to write result into a file ..
and compare them ...at least any web page for my reading..thanks a lot
请给我一些关于如何将结果写入文件的指针..
并比较它们...至少我阅读的任何网页..谢谢你很多
Please give me some pointer on how to write result into a file ..
and compare them ...at least any web page for my reading..thanks a lot
上周的一周提到了谈论的内容写入文本文件。但是,在这种情况下,您应该使用序列化将Arraylist作为对象写入文件。
Last week''s tip of the week talked about writing to a textfile. In this case however you should write the Arraylist to the file as an object using serialization.
这篇关于比较两个ArrayLists的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!