JAVA基础编程,求大神看看我这哪里出错了啊
importjava.util.Scanner;publicclasstest{publicstaticvoidmain(String[]args){Scannerin=...
import java.util.Scanner;
public class test{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
System.out.println("请输入你的姓名:");
String name=in.next();
System.out.println("请输入你的性别:");
String.sex=in.next();
System.out.println("请输入年龄:");
int age=in.nextInt();
System.out.println("姓名\t性别\t年龄\n");
System.out.print(name);
System.out.print(sex);
System.out.print(age);
}
} 展开
public class test{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
System.out.println("请输入你的姓名:");
String name=in.next();
System.out.println("请输入你的性别:");
String.sex=in.next();
System.out.println("请输入年龄:");
int age=in.nextInt();
System.out.println("姓名\t性别\t年龄\n");
System.out.print(name);
System.out.print(sex);
System.out.print(age);
}
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询