包数组;
公共类A {
public static void main(String[] args) {
String[] arr = { "employee","salaries","student","attendance"};
for (String x : arr)
{
System.out.println(x);
}
}
} //输出: 雇员 薪水 学生 出勤
答案 0 :(得分:0)
将System.out.println更改为
System.out.println("select * from " + x);
答案 1 :(得分:0)
system.out.println行缺少您期望的描述。您需要添加对帐单以便打印。下面是编辑后的代码。
package array;
public class A {
public static void main(String[] args) {
String[] arr = { "employee","salaries","student","attendance"};
for (String x : arr)
{
System.out.println("Select * from "+x); // you need to edit this line
}
}