摘要: public class StringTest { public static void main(String[] args) { String s1 = new String("abc");//构造器实例化,声明在堆 String s2 = new String("abc"); String s 阅读全文
posted @ 2022-11-11 12:29 exact1314 阅读(20) 评论(0) 推荐(0)
摘要: public class Singleton1 {//饿汉式 private Singleton1(){}; static Singleton1 singleton1 = new Singleton1(); public static Singleton1 getSingleton1(){ retu 阅读全文
posted @ 2022-11-11 09:29 exact1314 阅读(11) 评论(0) 推荐(0)
摘要: public int[] sortMaopao(int[] arry){ for (int i = 0; i <arry.length ; i++) { for (int j = 0; j < arry.length-1-i; j++) { if (arry[j]>arry[j+1]) {//从小到 阅读全文
posted @ 2022-11-11 08:57 exact1314 阅读(8) 评论(0) 推荐(0)
摘要: 组件如下: APP界面如下(码了logo): 功能概述 选择设备进行蓝牙选择 接收arduino发送的文本,存储到变量中,显示在温湿度显示的标签中 断开连接 可以断开蓝牙连接,并让断开连接和清除数据为不可用状态 清除数据 清空温湿度标签的显示内容,清空变量中存储内容 阅读全文
posted @ 2022-10-24 14:10 exact1314 阅读(963) 评论(0) 推荐(0)
摘要: 加法运算符 CREATE DATABASE test;-- 建库 USE test;--进库 CREATE TABLE demo1(name CHAR,age INT);--建表 --查询 SELECT 100+'1',100+'a',100+NULL FROM DUAL; /*结果 + + + + 阅读全文
posted @ 2022-10-22 15:20 exact1314 阅读(31) 评论(0) 推荐(0)
摘要: public class test { public static void main(String[] args) { //反转数组 int[] arrays = {1,2,3,4,5}; int[] result = new int[arrays.length]; for (int i = 0, 阅读全文
posted @ 2022-10-14 19:59 exact1314 阅读(29) 评论(0) 推荐(0)
摘要: public class test { public static void main(String[] args){ test t =new test(); int i=t.max(9,8,7,4,50); System.out.print(i); } public int max(int...i 阅读全文
posted @ 2022-10-14 14:23 exact1314 阅读(24) 评论(0) 推荐(0)
摘要: public class test { public static void main(String[] args){ //输出n行的三角形 int n= 25; for (int j = 0; j < n; j++) { for (int i = j; i < n; i++) { System.o 阅读全文
posted @ 2022-10-14 13:18 exact1314 阅读(36) 评论(0) 推荐(0)
摘要: public class test { public static void main(String[] args){ for (int j= 1; j <= 9; j++){ for (int i = 1; i <= j; i++) { System.out.print(i+"x"+j+"="+i 阅读全文
posted @ 2022-10-14 11:08 exact1314 阅读(28) 评论(0) 推荐(0)
摘要: public class test { public static void main(String[] args) { System.out.println("请输入计算x!的x值"); Scanner scanner = new Scanner(System.in); int m = scann 阅读全文
posted @ 2022-10-14 10:20 exact1314 阅读(22) 评论(0) 推荐(0)