- 博客(12)
- 收藏
- 关注
原创 Springboot学习
Spring是为了解决企业级应用开发的复杂性而创建的,简化开发。约定大于配置的核心思想,开箱即用。编写一个http接口1、在主程序的同级目录下,新建一个controller包,一定要在同级目录下,否则识别不到2、在包中新建一个HelloController类3、编写完毕后,从主程序启动项目,浏览器发起请求,看页面返回;控制台输出了 Tomcat 访问的端口号!**如何更改启动时显示的字符拼成的字母,SpringBoot呢?**也就是 banner 图案;到项目下的 resources 目录下新
2021-02-08 08:41:10 67
原创 Java学习.10
对象数组public class TestStudent { public static void main(String[] args) { Student[] arr = new Student[3]; Student stu1 = new Student("张三", 23); Student stu2 = new Student("李四", 24); Student stu3 = new Student("王五", 25);
2021-01-23 09:02:32 99
原创 Java学习.9
String类构造方法public class Test0 { public static void main(String[] args) { String s1 = new String(); System.out.println(s1); char[] chs ={'a','b','c'}; String s2 = new String(chs); System.out.println(s2);
2021-01-15 11:54:55 67
原创 Java学习.8
对象的创建和使用public class Student { String name; int age; public void Student() { System.out.println("学习"); }}public class TestStudent { public static void main(String[] args) { Student stu = new Student(); Syst
2021-01-13 17:44:29 99
原创 Java学习.7
数据交换public class Test2 { public static void main(String[] args) { int a = 20; int b = 10; a = a ^ b; b = a ^ b; a = a ^ b; System.out.println(a); System.out.println(b); }}数组反转public class
2021-01-12 17:04:57 68
原创 Java学习.6
n到m之间的奇数升级版public class Test2 { public static void main(String[] args) { print(15, 10); } public static void print(int n, int m) { if(n > m){ System.out.println("您传入的数据有误,请检查!"); return; }
2021-01-11 17:01:37 60
原创 Java学习.5
奇偶数判断public class Test2 { public static void main(String[] args) { method(); } public static void method() { int num = 9; if (num % 2 == 0) { System.out.println("偶数"); } else { System.ou
2021-01-09 16:51:22 54
原创 Java学习.4
数组遍历public class Test2 { public static void main(String[] args) { int[] arr = {11, 55, 66, 99, 77, 55, 33, 22, 44, 55, 77, 88, 55, 44, 11}; System.out.println("arr数组中元素的个数为" + arr.length); for (int i = 0; i < arr.length; i++
2021-01-08 17:09:26 79 2
原创 Java学习.3
案例:减肥计划import java.util.Scanner;public class Test2 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); System.out.println("请输入:"); int week = sc.nextInt(); switch (week) { case
2021-01-07 17:19:42 111
原创 java学习.2
隐性转换public class Test2 { public static void main (String[] args) { int a = 10; double b = a; }}public class Test2 { public static void main (String[] args) { int a = 10; double b = 12.3; double c = a
2021-01-06 16:26:42 213 1
原创 Java学习.1
1、数值录入Scanner sc = new Scanner(System.in);// System.out.println("Piease input x = ");// double x = sc.nextDouble();// System.out.println("Please input y = ");// double y = sc.nextDouble();// System.out.println("Plea
2021-01-06 08:50:55 91
原创 Java学习.0
Java EE :数据显示网站:服务器+网页Java 虚拟机:JVM开发Java程序:编写代码,编译代码,运行代码。JRE:JVM+Java核心类库JDK软件开发工具包:编译工具+运行工具A.class文件JDK:开发工具JRE:JVM+核心类库...
2021-01-05 16:18:14 62
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人