0

假设我有这个例子,如何添加它,以便稍后可以在 textflow 窗口中使用 gui 显示它?:

List<String> Test1 = ["a", "b", "c", "d"];

List<String> Test2 = ["1", "2", "3", "4"];

输出应该是这样的:(“实际输出,每一个新行”)

  1. Line = "a1";

  2. Line = "b2";

  3. Line = "c3";

这个怎么做?提前致谢。

4

1 回答 1

0

你的意思是这样的吗?

String[] Test1 = {"a", "b", "c", "d"};
String[] Test2 = {"1", "2", "3", "4"};

public void main(String[] args)
{
    for (int i = 0; i < Test1.length; i++)
    {
        System.out.println("Line = \"" + Test1[i] + Test2[i] + "\"");
    }
}
于 2020-06-05T12:04:38.937 回答