摘要: web.xml文件 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" ><web-app xmlns: 阅读全文
posted @ 2020-11-25 14:41 小韩呐~ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: package com.hp.test;import redis.clients.jedis.Jedis;import java.io.*;public class Test3 implements Serializable { private static final long serialVer 阅读全文
posted @ 2020-11-25 10:29 小韩呐~ 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { for(int i=1;i<10;i++) { for(int j=1;j<=i;j++){ System.out.print(j+"*"+i+"="+j*i+" "); } System.out.println(); 阅读全文
posted @ 2020-11-13 13:02 小韩呐~ 阅读(64) 评论(0) 推荐(0) 编辑
摘要: for each + map.keySet(); Set<Integer> set = map.keySet(); for (Integer key : set) { System.out.println("key:" + key + ", value:" + map.get(key)); } 阅读全文
posted @ 2020-11-12 19:14 小韩呐~ 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: //从键盘输入年份存放到变量year中 Scanner scanner=new Scanner(System.in); int year=scanner.nextInt(); //用if-else结构判断year中的年份是否为闰年 if(year%4==0 &&year % 100!=0 || ye 阅读全文
posted @ 2020-11-12 18:56 小韩呐~ 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 报的错误: [root@master bin]# ./startup.sh Cannot find /root/app/tomcat-9.0.7/bin/setclasspath.shThis file is needed to run this program 解决的办法: [root@maste 阅读全文
posted @ 2020-11-04 20:42 小韩呐~ 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 错误内容:Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 解决方案 第一步:选择项目右键点击 阅读全文
posted @ 2020-11-04 20:16 小韩呐~ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: FileInputStream和FileOutputStream是InputStream和OutputStream的子类,适合于 操作字节流,即最高操作8个位的单元。 FileInputStream的构造方法中,既可以接受现成的File对象进行操作,又可以直接接 受文件位置对文件进行操作。 File 阅读全文
posted @ 2020-10-26 20:49 小韩呐~ 阅读(176) 评论(0) 推荐(0) 编辑
摘要: File类对象表示磁盘上的文件或目录。 File类是JavaIO操作的主要类之一,为IO流的众多类提供了基本的操作对象,File类能做的事集中于文件的创建和 删除、文件属性的修改。 阅读全文
posted @ 2020-10-26 20:26 小韩呐~ 阅读(92) 评论(0) 推荐(0) 编辑
摘要: //冒泡排序 int n=0; int[] num = {2,1,4,3}; for(int i=0;i<num.length;i++){ for(int j=0;j<num.length-i-1;j++){ if(num[j+1] < num[j]){ n = num[j]; num[j]=num 阅读全文
posted @ 2020-10-21 10:57 小韩呐~ 阅读(72) 评论(0) 推荐(0) 编辑