摘要: Date类: getTime() 获取时间戳。(时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总毫秒数.) SimpleDateFormat类: 用于时间对象与字符串对象的转换。 格式:y :年 、M:月 、 d:日、 H 阅读全文
posted @ 2022-11-29 23:15 在博客做笔记的路人甲 阅读(94) 评论(0) 推荐(0) 编辑
摘要: IP地址: 用于定位在网络中的节点。 InetAddress类 //获取本机ip地址 InetAddress ip1 = InetAddress.getLocalHost(); //获取域名的ip地址 InetAddress ip2 = InetAddress.getByName("www.baid 阅读全文
posted @ 2022-11-29 22:45 在博客做笔记的路人甲 阅读(528) 评论(0) 推荐(0) 编辑