- 博客(3)
- 收藏
- 关注
原创 已知字符串如下: "good good study day day up" 请定义方法将字符串中每一个单词的首字母大写,其余的小写
import static java.lang.Character.toUpperCase;import static java.lang.Character.toUpperCase;public class Change { public static void main(String[] args) { String s = "good good study da...
2019-07-13 23:53:30
633
原创 获取长度为5的随机字符串 字符串由随机的4个大写英文字母和1个0-9之间(包含0和9)的整数组成 英文字母和数字的顺序是随机的
import java.util.Random;public class Test3 {public static void main(String[] args) {//动态定义一个长度为5的字符数组char[] ch = new char[5];String s = getStr(ch);System.out.println("s: " + s);}public static...
2019-07-06 00:24:30
1059
原创 数组的去重
import java.util.Random;public class Test3 {public static void main(String[] args) { Random r = new Random(); //定义一个长度为100的数组 int[] arr = new int[100]; //遍历数组 for (int i = 0; i &...
2019-07-04 20:12:04
161
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅