摘要:
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)

浙公网安备 33010602011771号