ScannerDemo------string int

import java.util.Scanner;                                                /** *Scanner演示 */

public class ScannerDemo{

 public static void main(String[] args){              //使用Scanner工具类,来通过控制台接收信息

 

    Scanner sc = new Scanner(System.in); 

     Scanner sc1 = new Scanner(System.in);

 

  String s = sc.nextLine();

int s1   = sc1.nextInt();

 

   System.out.println(s+" "+s1);  

 }

}

 

 

 

 

posted @ 2014-09-17 13:51  fantasy12436109  阅读(115)  评论(0编辑  收藏  举报