求字符串函数!!!! string str=“aaaaaaaaaa”;我想返回左边五个字符,不晓得java里面用什么函数可以解决,没有的话我自己写了谢谢大家帮忙 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 str.subString(0,5);这种问题看1分钟帮助你就能找到答案了。 str.subString(0,5);汗,这样的问题 public class SubStr{public static void main(String[] args){String str ="abcdefghijkl";String str2=str.substring(0,5);System.out.pritln("This is the five of the String "+str2);}}Try it! You can chat with me on MSN :[email protected] 用 substring 函数 substring(int start(起始下标),int long(长度)) Harbin_SAKURA 真是眼明手快,呵呵 。 不用看更好 求助java可视化,如何左键点击画绿色的圆,左键点击画方框,我的paint1和paint2中有形参Graphics,该怎么用?我是菜鸟啊 无聊了,发个Java连接VPN的代码上来分享一下 在eclipse的控制台中的光标定位问题 xml报错,请帮忙,在线等!!!! 求助 用ftp下载文件,运行一段时间就内存泄漏,为什么啊?高手帮忙啊!! 懂C语言的进来看看,这个怎么转成JAVA代码,谢谢 论坛怎么不能注册新用户了 这段代码有错么? 向高手请教问题!谢谢 我在JTable1中双击一行数据如何在另一个JTable2中显示?急....先谢谢拉 究竟哪一句正确
汗,这样的问题
public static void main(String[] args){
String str ="abcdefghijkl";
String str2=str.substring(0,5);
System.out.pritln("This is the five of the String "+str2);
}
}Try it! You can chat with me on MSN :[email protected]