aleel_008
发贴: 43
积分: 0
|
于 2004-09-30 00:26
public class GetNumber { public static void main(String[] args){ System.out.println(getNumber()); } private static String getNumber(){ String str=new String("会计科目11101+1102-(1103-1104)的科目余额"); byte[] bytes=str.getBytes(); StringBuffer buffer=new StringBuffer(""); String temp; try{ for(int i=0;i<str.length();i++){ temp=str.substring(i,i+1); if(temp.getBytes().length==1){ buffer.append(temp); } } } catch(Exception e){ e.printStackTrace(); } return new String(buffer); } }
|