如何获得“select*from employee”、“select*from palaries”、“select*from student”和“select*from attention”输出

c9qzyr3d  于 2021-06-20  发布在  Mysql
关注(0)|答案(2)|浏览(240)

关闭。这个问题需要细节或清晰。它目前不接受答案。
**想改进这个问题吗?**通过编辑这个帖子来添加细节并澄清问题。

两年前关门了。
改进这个问题
封装阵列;
公共a级{

public static void main(String[] args) {
    String[] arr = { "employee","salaries","student","attendance"};
    for (String x : arr)
    {
        System.out.println(x);
    }

}

}//输出:员工工资学生出勤

nbnkbykc

nbnkbykc1#

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
    }    
}
1rhkuytd

1rhkuytd2#

将system.out.println更改为

System.out.println("select * from " + x);

相关问题