我的netbeans7.0运行Java程序,输入英文没问题,为什么输入中文出问题了?
我的netbeans7.0运行Java程序,输入英文没问题,为什么输入中文出问题了?
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package myinfoemation;import java.util.*;/** * * @author Administrator */public class MyInfoemation { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner in=new Scanner(System.in); System.out.println("请输入姓名:"); String name=in.nextLine(); System.out.println("请输入地址;"); String address=in.nextLine(); System.out.println("请输入电话号码:"); int phonenumber=in.nextInt(); System.out.println("姓名:"+name); System.out.println("地址:"+address); System.out.println("电话号码:"+phonenumber); }}