From 2e60ca841b7763e7850f50827caf2225b7067030 Mon Sep 17 00:00:00 2001 From: Takagi Date: Wed, 5 Jun 2024 14:49:08 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=8F=90=E4=BA=A40531=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.jsp" | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 "work/com/java/minxi/java_20240531/java_2302_\346\235\216\346\224\277\345\223\262_2344310218/index.jsp" diff --git "a/work/com/java/minxi/java_20240531/java_2302_\346\235\216\346\224\277\345\223\262_2344310218/index.jsp" "b/work/com/java/minxi/java_20240531/java_2302_\346\235\216\346\224\277\345\223\262_2344310218/index.jsp" new file mode 100644 index 0000000..dcfade0 --- /dev/null +++ "b/work/com/java/minxi/java_20240531/java_2302_\346\235\216\346\224\277\345\223\262_2344310218/index.jsp" @@ -0,0 +1,47 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2024-06-05 + Time: 14:12 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Title + + +<%! + public class Animal{ + public String sleep(int time){ + return "一只动物在睡觉"; + } + } + public class Cat{ + public String name; + public int time; + + public Cat(String name) { + this.name = name; + } + + public String sleep(int time){ + return "一只"+this.name+"睡觉睡了"+time+"个小时"; + } + } +%> +<% + out.print(new Animal().sleep(0)+"
"); + out.print(new Cat("汤姆猫").sleep(8)); +%> +
+<% + for (int i = 1; i <= 9; i++) { + for (int j = 1; j <= i; j++) { + out.print(" "+i+"*"+j+"="+(i*j)); + } + out.print("
"); + } +%> + + -- Gitee