java - 如何获得输出为“从员工中选择*”,从工资中选择*,从学生中选择*和从出勤中选择*
问题描述
封装数组;
公共类 A {
public static void main(String[] args) {
String[] arr = { "employee","salaries","student","attendance"};
for (String x : arr)
{
System.out.println(x);
}
}
} //输出:员工工资学生考勤
解决方案
将您的 System.out.println 更改为
System.out.println("select * from " + x);