csfw.net
当前位置:首页>>关于java怎么将数字1转换为大写一的资料>>

java怎么将数字1转换为大写一

如下是一个将阿拉伯数字转为汉字的类,需要者可收藏到自己的util类库中以备不时之需。 public class ArabicToChineseUtils { static String[] units = { "", "十", "百", "千", "万", "十万", "百万", "千万", "亿", "十亿", "百亿", "千亿", "...

import java.io.BufferedReader; import java.io.FileReader; public class setrs { public static void main(String[] args) throws Exception { String fileName = "c:\\input.txt"; // 单位数组 String[] units = new String[] {"十", "百", ...

public class test { public static void main(String args[]) { int ss = Integer.parseInt(args[0]); if(ss==0) System.out.println("零"); else if (ss==1) System.out.println("壹"); else if (ss==2) System.out.println("贰"); else if (s...

public class Test { public static void main(String[] args) { String str = "C002"; String shuzi = str.substring(1); char[] chars = str.toCharArray(); String new_str = chars[0]-64+shuzi; System.out.println(new_str); }}

package com.yiibai; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MakeFirstLetterUppercase { public static void main(String[] args) { String str = "this is a java test String upcase: 123string"; S...

public class Test3{ public static void main(String[] args){ String str="ABCabcVc"; char[] ch=str.toCharArray(); for(int i=0;i=65&&(int)ch[i]

public class StringCaseShift { public static String shift(String str) { int size = str.length(); char[] chs = str.toCharArray(); for (int i = 0; i < size; i++) { if (chs[i] = 'A') { chs[i] = (char) (chs[i] + 32); } else if (chs...

public class RenMingBi { /** * @param args add by zxx ,Nov 29, 2008 */ private static final char[] data = new char[]{ '零','壹','贰','叁','肆','伍','陆','柒','捌','玖' }; private static final char[] units = new char[]{ '元','拾...

package com.zz; import java.util.ArrayList; import java.util.List; public class Test { public static void main(String[] args) { List list1 = new ArrayList(); List list2 = new ArrayList(); list1.add("a"); list1.add("b"); list1.a...

看了这个简单的代码,你应该就懂了package cn.txet.partice;import java.util.Scanner;public class DemoBigNumbers {int a, b, c;String bi, si, ge;public static void main(String[] args) {DemoBigNumbers db = new DemoBigNumbers();System....

网站首页 | 网站地图
All rights reserved Powered by www.csfw.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com