zoukankan      html  css  js  c++  java
  • java 字节流和字符流转换类InputStreamReader,OutPutStreamReader



    import java.io.*;
    
    public class BufferDemo
    {
    	public static void main(String[] args) throws IOException
    	{
    		BufferedReader buf=null;
    		
    		buf=new BufferedReader(new InputStreamReader(System.in));
    		System.out.print("Please enter a number:");
    		String str=buf.readLine();
    		//将字符串解析为整数
    		int i=Integer.parseInt(str);
    		i=i+10;
    		System.out.println("The modified number is "+i+".");
    	}
    }


查看全文
  • 相关阅读:
    CentOS ping: unknown host 解决方法
    chmod 777 修改权限
    Nginx 0.8.x + PHP 5.2.13(FastCGI)搭建胜过Apache十倍的Web服务器[摘抄]
    PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
    unix:/tmp/php-cgi.sock
    Nginx虚拟主机配置教程
    nginx 浏览php的时候会变成下载
    sphinx的配置和管理.No2
    Sphinx以及coreseek的安装及使用 .No1
    76、android:supportsRtl 和 android:layout_marginEnd
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10726260.html
  • Copyright © 2011-2022 走看看