会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
CherryYang
博客园
首页
新随笔
联系
订阅
管理
2020年5月27日
Java IO Buffered缓冲流
摘要: BufferedOutputStream 字节输出流 缓冲流 BufferedInputStream 字节输入流 缓冲流 BufferedWriter 字符输出流 缓冲流 BufferedReader 字符输入流 缓冲流 构造方法: * BufferedOuputStream(OuputStream
阅读全文
posted @ 2020-05-27 15:17 CherryYang
阅读(188)
评论(0)
推荐(0)
2020年5月18日
Java 导包
摘要: 静态导包 //static修饰 最末尾必须是一个静态成员 import static java.lang.System.out; import static java.util.Arrays.sort; public static void main(String[] args) { out.pri
阅读全文
posted @ 2020-05-18 19:28 CherryYang
阅读(331)
评论(0)
推荐(0)
2020年5月17日
Java 包装类的自动封箱与拆箱
摘要: 自动拆箱与封箱 Integer in = 1;// 自动封箱 Integer in= new Integer(1) in = in + 5;// 自动拆箱 in.intValue() 与int类型的5进行加运算 System.out.println(in); 数组集合中 集合中的元素只能是引用类型的
阅读全文
posted @ 2020-05-17 00:40 CherryYang
阅读(392)
评论(0)
推荐(0)
2020年5月16日
Java 基本类型的包装类
摘要: 基本数据类型 byte short int long boolean char float double 对应的包装类 Byte Short Integer Long Boolean Character Float Double 包装类的主要作用 将字符串 解析转化为 各种数据类型 各包装类都有的静
阅读全文
posted @ 2020-05-16 19:29 CherryYang
阅读(242)
评论(0)
推荐(0)
2020年5月15日
Java日期时间练习三(闰年)
摘要: 闰年判定 import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Scanner; public static void Year() throws E
阅读全文
posted @ 2020-05-15 12:27 CherryYang
阅读(368)
评论(0)
推荐(0)
2020年5月9日
导入包与模块
摘要: import os os.makedirs('glance/api') os.makedirs('glance/cmd') os.makedirs('glance/db') ls = [] ls.append(open('glance/__init__.py','w')) ls.append(ope
阅读全文
posted @ 2020-05-09 19:33 CherryYang
阅读(188)
评论(0)
推荐(0)
2020年5月8日
模块_os模块
摘要: import os print(os.getcwd()) # 获取当前工作目录 print(os.listdir()) # 列表列出当前目录下的目录名和文件名 os.mkdir("tempdir") os.chdir("./tempdir") new_dir = os.getcwd() print(
阅读全文
posted @ 2020-05-08 10:52 CherryYang
阅读(147)
评论(0)
推荐(0)
2020年5月6日
Re模块练习题
摘要: import re s = "1 -2*(60+(-40.35/5)-(-4*3))" # 获取所有数字 ret = re.findall(r"\d+", s) print(ret) # ['1', '2', '60', '40', '35', '5', '4', '3'] # 小数不被拆分 针对小
阅读全文
posted @ 2020-05-06 22:17 CherryYang
阅读(179)
评论(0)
推荐(0)
Re模块的方法补充
摘要: id_str = input("输入一个身份证号:") import re obj = re.compile(r"^([1-9]\d{16}[0-9x]|[1-9]\d{14})$") # 将正则表达式编译成为一个 正则表达式对象 ret = obj.match(id_str) if ret: pr
阅读全文
posted @ 2020-05-06 16:50 CherryYang
阅读(190)
评论(0)
推荐(0)
Re模块的 三个方法
摘要: import re s1 = '绿茶白茶黄茶青茶红茶黑茶' s2 = '中国绿茶白茶黄茶青茶红茶黑茶' ret = re.findall(".茶", s1) print(ret) r1 = re.search(".茶", s1) print("search方法直接返回", r1) if r1: pr
阅读全文
posted @ 2020-05-06 15:04 CherryYang
阅读(189)
评论(0)
推荐(0)
下一页
公告