package com.jikexueyuan.ch01;
import com.sun.java_cup.internal.runtime.Scanner;
public class text08 {
public static void main(String[] args) {
// TODO Auto-generated method stub
//步骤一:创建一个scanner对象
Scanner scanner=new Scanner(System.in);
//步骤二:想控制台输出文本
System.out.println("姓名=");
//步骤三:接受输入的字符串
String name=scanner.next();
System.out.println("性别=");
char sex=scanner.next().charAt(0);
System.out.println("年龄");
int age=scanner.nextInt();
System.out.println("身高=");
double height=scanner.nextDouble();
System.out.println("性格=");
String type=scanner.next();
求大神帮我看看哪里出错了
相关分类