您的位置:首页 > 编程语言 > Java开发

java 使用与字符串相关的类来处理数据

2011-11-01 11:47 239 查看
package pack1;

import java.io.*;

public class iostring {

/**
* @param args
*/

private int x;
iostring()
{
this.x = 10;
}

private void SetX() throws IOException
{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str = buf.readLine();
this.x = Integer.parseInt(str);
}

private void show()
{
StringBuffer temp = new StringBuffer(String.valueOf(this.x));
temp = temp.reverse();
System.out.print(temp.toString());
System.out.print("asdfd");
}
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
iostring iostring1 =new iostring();
iostring1.SetX();
iostring1.show();
}

}


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java string import class
相关文章推荐