摘要: enum枚举 使用enum代替class修饰 常量名(实参列表),常量名(实参列表)... 如果使用enum,将定义的常量对象写在最前面 成员方法 name()返回名称 ordinal()返回序号,从0开始编号 values()返回enum类的数组 valueOf()将已知字符串转成一个枚举对象(字 阅读全文
posted @ 2023-03-11 22:36 5hithin 阅读(87) 评论(0) 推荐(0)
摘要: 八种包装类 Boolean,Character,Byte,Short,Long,Integer,Double,Float int n1=100; Integer integer1=Integer.Valueof(n1);//手动装箱 Integer integer2=new Integer(n1); 阅读全文
posted @ 2023-03-11 22:36 5hithin 阅读(17) 评论(0) 推荐(0)
摘要: Collection 动态保存 接口:list,set 双列集合,单列集合 Collection遍历 Iterator iterator=coll.iterator(); while(iterator.hasNext()){ System.out.println(iterator.next());/ 阅读全文
posted @ 2023-03-11 22:36 5hithin 阅读(13) 评论(0) 推荐(0)
摘要: 数字反转(升级版) 题目描述 给定一个数,请将该数各个位上数字反转得到一个新数。 这次与 NOIp2011 普及组第一题不同的是:这个数可以是小数,分数,百分数,整数。 整数反转是将所有数位对调。 小数反转是把整数部分的数反转,再将小数部分的数反转,不交换整数部分与小数部分。 分数反转是把分母的数反 阅读全文
posted @ 2023-03-11 22:35 5hithin 阅读(51) 评论(0) 推荐(0)
摘要: 我的代码 思路:用循环模拟,碰壁之后转弯 #include<stdio.h> #include<stdlib.h> int main(){ int n; scanf("%d",&n); int**a=(int**)malloc(n*sizeof(int*)); for(int i=0;i<n;i++ 阅读全文
posted @ 2023-03-11 22:35 5hithin 阅读(85) 评论(0) 推荐(0)
摘要: 循环 c++如何实现格式化输出 #include <iostream> #include <iomanip> using namespace std; int main() { int no=0,yes=0,yes_count=0; int n,k; cin>>n>>k; int i=1; int 阅读全文
posted @ 2023-01-26 20:06 5hithin 阅读(48) 评论(0) 推荐(0)
摘要: @ResponseBody 可以将java类转化成json返回接口 出现406的原因是,java类内无getter和setter package com.example.demo.bean; public class User { private String name; private Integ 阅读全文
posted @ 2023-01-13 21:51 5hithin 阅读(24) 评论(0) 推荐(0)
摘要: NULL To test for NULL, use the IS NULL and IS NOT NULL operators. The result of any arithmetic comparison with NULL is also NULL In MySQL, 0 or NULL m 阅读全文
posted @ 2022-12-21 13:58 5hithin 阅读(13) 评论(0) 推荐(0)
摘要: Mysql Basic 1.Connect to mysql --initialization mysql -uroot -p123456 UPDATE user SET authentication_string="" WHERE user=“root”;--set the password wh 阅读全文
posted @ 2022-12-21 13:56 5hithin 阅读(29) 评论(0) 推荐(0)
摘要: 异常机制 异常指程序运行中出现的不期而至的各种情况 检查性异常/编译异常 用户错误 运行时异常 运行时异常有可能在编译时被忽略 NullPointerException ArithmeticException ArrayIndexOutOfBoundsException ClassCastExcep 阅读全文
posted @ 2022-12-15 19:58 5hithin 阅读(30) 评论(0) 推荐(0)