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);  

 }

}

ScannerDemo------string int的更多相关文章

  1. QString, string, int, char* 之间相互转换

    这三种数据类型在实际运用中经常需要互相转换,那么这里小结下它们之间的转换方法: - Qstring & string Qt中封装的类十分强大,其成员函数数量之多比STD有过之而无不及,许多程序 ...

  2. string int 转换

    int转stringint n = 0;std::stringstream ss;std::string str;ss<<n;ss>>str;string转intstd::st ...

  3. Java Convert String & Int

    To convert a int to string: int num = 123; String str = String.valueOf(num); To convert a string to ...

  4. C++ char*,const char*,string,int 的相互转换

    C++ char*,const char*,string,int 的相互转换   1. string转const char* string s ="abc";const char* ...

  5. The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)

    package comxunfang.button; import android.support.v7.app.ActionBarActivity; import android.os.Bundle ...

  6. Java不同类型字符转换String/int/Float/////

    1.int & String int i=5678;String s=""; int->String: s=i+"";或 s=String.val ...

  7. string int 类型转换

    string  int  类型转换 (int) 此方法不适用于将string 转换为int 只能转换数值类型为int 而不能转换引用类型 不会四舍五入 直接去掉小数位 Conver.ToInt() 会 ...

  8. java中String,int,Integer,char、double类型转换

    java中String,int,Integer,char.double类型转换----https://www.cnblogs.com/kangyu222/p/5866025.html

  9. Java:String,int相互转化

    int转String int a: a + “”    String.valueOf(a)    Interger.toString(a)    一般使用以上几种方法进行转化 第一种方法效率不好,ja ...

  10. String int 变量互相转化

    int -> String int i=12345;String s="";第一种方法:s=i+"";第二种方法:s=String.valueOf(i); ...

随机推荐

  1. 关于JS异步加载方案

    javascript延迟加载的解决方案: 1.使用defer标签 <span style="font-size: small;"><script type=&qu ...

  2. java dom4j解析xml用到的几个方法

    1. 读取并解析XML文档: SAXReader reader = new SAXReader(); Document document = reader.read(new File(fileName ...

  3. Rac & DG

    Rac环境: RAC版本异同:[10R2,11R1(和10类似)],11R2,12c: 目录: 10.2的ASM需要单独的目录(oracle home):rdbms home,asm home, cr ...

  4. RMAN备份失败之:mount: block device /dev/emcpowerc1 is write-protected, mounting read-only

    今天再做巡检的时候发现有一台服务器的RMAN备份不正常,有一段时间没能正常备份了.检查了一下脚本,正常,定时任务列表也正常,再检查一下/var/log/cron的内容,也没有问题.尝试在该挂载点上创建 ...

  5. docker 感性介绍

    Docker 允许开发者们将他们的应用打包放在云端的“容器”中,无需再修改就可以发布到任何流行的 Linux 机器上.由于采用沙盒机制,各应用之间没有任何接口,所以不用担心它们会相互干扰.也同样因为这 ...

  6. 在iOS App的图标上显示版本信息

    最近读到一篇文章(http://www.merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/)介绍了一种非 ...

  7. http 4中 cache 头

    // head['Cache-Control']='max-age=31536000'; // head['Expires']=new Date((new Date().getTime()+99999 ...

  8. highCharts 电流表、电压表

    var highChartsSettingV = { chart: { margin: [5, 2, 5, 8], type: 'gauge', plotBorderWidth: 1, plotBac ...

  9. Memcached 安装及配置

    下载Memcached.exe 保存到c:\memcached 运行command: 输入 c:\memcached\memcached.exe -d install 回车,安装memcached s ...

  10. 【转载】C#.Net 创建网页快捷方式

    using System.Runtime.InteropServices; using IWshRuntimeLibrary; // 添加引用:COM下Windows Script Host Obje ...