摘要: package com.someexercise; import java.util.Arrays; public class restring { /* 字符反转 将字符串中指定部分进行反转。比如将"abcdef"反转为"aedcbf" 编写方法 public static String reve 阅读全文
posted @ 2023-03-31 22:11 Q1uuuu 阅读(33) 评论(0) 推荐(0)
摘要: package com.arrays_; import java.util.Arrays; import java.util.Comparator; public class ArraysExercise { public static void main(String[] args) { /* 案 阅读全文
posted @ 2023-03-31 20:33 Q1uuuu 阅读(60) 评论(0) 推荐(0)
摘要: package com.arrays_; import java.util.Arrays; import java.util.Comparator; public class ArraysSortCustom { public static void main(String[] args) { in 阅读全文
posted @ 2023-03-31 19:23 Q1uuuu 阅读(33) 评论(0) 推荐(0)
摘要: package com.stringbuffer_; import java.math.BigDecimal; import java.util.Scanner; public class StringBufferExercise01 { public static void main(String 阅读全文
posted @ 2023-03-31 17:56 Q1uuuu 阅读(20) 评论(0) 推荐(0)
摘要: package com.q1u.array; public class ArrayDemo08 { public static void main(String[] args) { //1.创建一个二维数组 11*11 0:没有棋子 1:黑棋 2:白棋 int[][] array1 = new in 阅读全文
posted @ 2023-03-28 17:53 Q1uuuu 阅读(18) 评论(0) 推荐(0)
摘要: package com.q1u.array; import java.util.Arrays; //冒泡排序 //1.比较数组中两个相邻的元素,如果第一个数大于第二个,交换两者位置 //2.每一次比较,都会产生一个最大或者最小的数组,下一轮就少一次排序 //3.依次循环,直到结束 public cl 阅读全文
posted @ 2023-03-28 17:52 Q1uuuu 阅读(20) 评论(0) 推荐(0)
摘要: package com.q1u.method; import java.util.Scanner; public class Counter { public static void main(String[] args) { Scanner scanner = new Scanner(System 阅读全文
posted @ 2023-03-27 22:41 Q1uuuu 阅读(46) 评论(0) 推荐(0)
摘要: package com.q1u.struct; public class TestDemo { public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (int j = 5; j > 阅读全文
posted @ 2023-03-27 22:39 Q1uuuu 阅读(43) 评论(0) 推荐(0)
摘要: package com.q1u.struct; //标签的运用,类似于goto public class LabelDemo { public static void main(String[] args) { //打印101~150之间所有的质数 int count = 0; outer:for 阅读全文
posted @ 2023-03-27 22:39 Q1uuuu 阅读(22) 评论(0) 推荐(0)
摘要: package com.q1u.struct; /* 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*5=15 4*5=20 5*5=25 1*6=6 2*6=12 3*6=18 4*6=24 阅读全文
posted @ 2023-03-27 22:38 Q1uuuu 阅读(313) 评论(0) 推荐(0)