- 博客(12)
- 收藏
- 关注
原创 归并排序
package sort;import java.util.Arrays;public class merge { public static void main(String[] args) { int[] m = {1, -4, 53, 4, 656, 4565, -43, 69}; sort(m, 0, m.length - 1, new int[m.length]); System.out.println(Arrays.toString(m)); } publi
2021-07-21 23:35:23 111
原创 快速排序
package sort;import java.util.Arrays;public class QuickSort { public static void main(String[] args) { int[] m = {-23, -3, 565, 87, 560, 656, -56, -5, -23, -3, 565, 87, 560, 656, -56, -5}; sort(m, 0, m.length - 1); System.out.println(Arrays.to
2021-07-21 17:46:12 102
原创 Error creating bean with name ‘com.shy.service.impl.ProductServiceImplTest‘: Unsatisfied dependency
spring单元测试报错 Error creating bean with name 'com.shy.service.impl.ProductServiceImplTest': Unsatisfied dependency expressed through field 'service'; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'r
2021-07-16 12:23:43 513 1
原创 spring单元测试时报错,java.lang.IllegalStateException: Failed to load ApplicationContext,Caused by:
项目场景:spring单元测试问题描述:java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.springframework
2021-07-11 19:25:45 1958
原创 分页显示情况
分页显示情况<div id="page_nav"> <%-- 页码大于1才显示--%> <C:if test="${requestScope.page.pageNo > 1}"> <a id="qw" href="manager/bookServlet?action=list&pageNo=1">首页</a> <a href="manager/bookServ.
2021-06-16 00:18:46 176
原创 杨辉三角
public class YangHuiSanJiao { public static void main(String[] args) { int[][] m = new int[10][]; // 10行杨辉三角 for (int i = 0; i < m.length; i++) { int[] n = new int[i + 1]; // 创建一个一维数组(相当于横行) // 每行首末为
2021-05-01 13:15:09 65
原创 时间更新显示
import java.text.SimpleDateFormat;import java.util.Date;public class Time { public static void main(String[] args) throws InterruptedException { Thread l = new Thread(new Runnable() {// 创建新线程 @Override public void r
2021-04-24 14:45:48 64
原创 使用栈方式 合并两个有序的单链表,合并后依然有序
package LinkList;import java.util.Stack;public class Test { public static void main(String[] args) { head = new Student(); head.next = new Student("红", 1); add(head, new Student("张", 9)); add(head, new Student("吴", 5
2021-04-20 00:43:39 231
原创 随机生成不重复的随机数
import java.util.Arrays;import java.util.Random;public class Radoms { public static void main(String[] args) { Random a = new Random();// 创建对象 int[] q = new int[5];// 初始化一个容量为5的数组 while (true) { for (int i = 0; i
2021-04-14 20:52:21 178
原创 九九乘法表
九九乘法表在这里插入代码片public class WW { static int j = 1; public static void main(String[] args) { int p=1,m= 0, i = 0; for ( ;p<= 45;p++ )//第二个乘数横向输出时不变,第一个递增 { i++; m = i * j; if (i == j) { System.out.println(i+"*"+j+"=
2021-04-05 20:36:26 103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人