会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xinZhiZhu
博客园
首页
新随笔
联系
订阅
管理
2020年7月29日
java_集合Collection
摘要: 集合的每个内部类里面都有一个独有的迭代器,ArrayList\LinkedList\HashSet 里面都继承了Collection的迭代器 Collection c=new ArrayList() //继承 Iterator it=c.iterator() //返回当前集合的迭代器对象 while
阅读全文
posted @ 2020-07-29 12:01 xinZhiZhu
阅读(94)
评论(0)
推荐(0)
2020年6月27日
java_常用类
摘要: String: 下面三条语句分别创建了几个对象: String s1=new String("abc");// 2 堆中一个,方法区一个 String s2="abc";// 0 String s3=new String("abc");// 1 堆中一个 String s4="he"+"ll"+"o
阅读全文
posted @ 2020-06-27 19:18 xinZhiZhu
阅读(138)
评论(0)
推荐(0)
2020年6月24日
java_排序
摘要: 选择排序: int []arry={85,64,3,5,1,94,2,31,0,60}; for(int i=0;i<arry.length-1;i++){ int min=i; //min最为标记记录当前最小值,把最小的值放在前面 for(int j=i+1;j<arry.length;j++){
阅读全文
posted @ 2020-06-24 18:05 xinZhiZhu
阅读(155)
评论(0)
推荐(0)
java拾笔2_异常
摘要: catch必须从小类型异常的到大类型异常进行捕捉 catch(FileNotFoundException e){ e.printStackTrace();//输出异常信息 } finally为了保证某一资源一定会释放,所以finally语句中写释放资源的代码: public static void
阅读全文
posted @ 2020-06-24 18:00 xinZhiZhu
阅读(134)
评论(0)
推荐(0)
Java_杨辉三角(等腰)
摘要: //创建数组 final int N = 10; int[][] yang=new int[N][]; for(int i=0;i<yang.length;i++){ yang[i]=new int[i+1]; } //赋值 for(int i=0;i<yang.length;i++){ for(i
阅读全文
posted @ 2020-06-24 11:42 xinZhiZhu
阅读(528)
评论(0)
推荐(0)
2020年6月17日
java拾笔-1
摘要: 数据类型:之类型转换: char a='a';//a这个字符在ASCII编码上位于97位 char b='中'; int i=a;//自动类型转换 char d=48; System.out.println(i);//97 System.out.println(d);//0 这个0不是整形0 而是一
阅读全文
posted @ 2020-06-17 18:39 xinZhiZhu
阅读(167)
评论(0)
推荐(0)
2020年6月8日
day06_函数
摘要: def function_name(): 函数体 函数调用() 不定长参数: 1:单个元素 def add(*args): sum=0 for i in args: sum+=i print(sum) add(2,4,2,9) 2:类似于字典中键值对的不定长形式 def print_info(*ar
阅读全文
posted @ 2020-06-08 19:29 xinZhiZhu
阅读(156)
评论(0)
推荐(0)
2020年6月6日
day05_虚拟机_常见Linux命令
摘要: buntu: 常用到的apt命令: apt-cache search package 搜索包apt-cache show package sudo apt-get install package 安装包 sudo apt-get remove package 删除包 sudo apt-get rem
阅读全文
posted @ 2020-06-06 10:15 xinZhiZhu
阅读(298)
评论(0)
推荐(0)
2020年6月5日
day04_file
摘要: 文件操作: 在同级目录下,访问文件text1 file=open('text1','r')#若同级目录下没有text1文件时,python会新创建text1文件 print(file.read()) file.close() 对于文件的操作,实质上就三部:打开>操作>关闭(虽然python自己会关闭
阅读全文
posted @ 2020-06-05 12:10 xinZhiZhu
阅读(130)
评论(0)
推荐(0)
2020年6月1日
day03_python-time、字符串拼接及内置函数
摘要: time: 获取时间:获取格式化时间: import time local=time.asctime(time.localtime(time.time()))print("the localtime is",local) 格式化日期: import time time.strftime("%Y-%m
阅读全文
posted @ 2020-06-01 18:48 xinZhiZhu
阅读(362)
评论(0)
推荐(0)
下一页
公告