Chapter 15 API

java.util.logging package

The constructor of Logger class is protected. If Logger instance is needed, must use static function getLogger().

e.g.

Logger logger = Logger.gerLogger("cc.openhome.Main");

//Logger logger = Logger.gerLogger(Main.class.getName());
//If you add '.class' you can get the class instance, then '.getName' can get the full name

ResourceBundle

for changeable information, it is considerable to move it out of program.

.properties must be put in classpath.

Locale

It contains two points: Language code & Country code.

Language code:

ca: Catalan
zh: Chinese

Country code:

IT: Italy
TW: Taiwan
CN: China

Regular Expression

Character class:

[ ] means if any:

    for (String token : "Justin1Monica2Irene3".split("[123]")) {
out.println(token);
}
  • means from to:

    [1-5], [a-z]

^ means without:

[^abc]

Greedy quantifier, Reluctant quantifier

Greedy quantifier will find the suitable words as longer as possible.

\d{4}-\d{6} equals \d\d\d\d-\d\d\d\d\d\d

xfooxxxxxxxfo if compared by .*foo, it 's the full

Reluctant quantifier will find the suitable words as shorter as possible.

xfooxxxxxxxfo if compared by .*?foo, there will be two: xfoo and xxxxxxxfo

Possessive quantifier will eat all suitable words and won't back-up

xfooxxxxxxxfo if compared by .?+foo, there's none left, because .+ is suitable for xfooxxxxxxxfo, so nothing left.

20145109 《Java程序设计》第八周学习总结的更多相关文章

  1. 201521123027 <java程序设计>第八周学习总结

    1.本周学习总结 1.1思维导图 2.书面作业 Q1.List中指定元素的删除(题目4-1) 1.1 实验总结 总结:判断List中是否存在指定元素,需要用到equals方法,若存在就用remove进 ...

  2. 20145109《Java程序设计》第二周学习总结

    20145109 <Java程序设计>第二周学习总结 教材学习内容总结 Variable : naming rule : Camel case no default value e.g : ...

  3. 20145109《Java程序设计》第一周学习总结

    20145109 <Java程序设计>第一周学习总结 教材学习内容总结 About JVM, JRE, JDK JVM包含于JRE中,用于运行Java程序.JDK用于开发Java程序,包含 ...

  4. 201571030332 扎西平措 《面向对象程序设计Java》第八周学习总结

    <面向对象程序设计Java>第八周学习总结   项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https: ...

  5. 201871010106-丁宣元 《面向对象程序设计(java)》第八周学习总结

    201871010106-丁宣元 <面向对象程序设计(java)>第八周学习总结 正文开头: 项目 内容 这个作业属于哪个课程 https://home.cnblogs.com/u/nwn ...

  6. 20145213《Java程序设计》第九周学习总结

    20145213<Java程序设计>第九周学习总结 教材学习总结 "五一"假期过得太快,就像龙卷风.没有一点点防备,就与Java博客撞个满怀.在这个普天同庆的节日里,根 ...

  7. 21045308刘昊阳 《Java程序设计》第九周学习总结

    21045308刘昊阳 <Java程序设计>第九周学习总结 教材学习内容总结 第16章 整合数据库 16.1 JDBC入门 16.1.1 JDBC简介 数据库本身是个独立运行的应用程序 撰 ...

  8. 20145236 《Java程序设计》第九周学习总结

    20145236 <Java程序设计>第九周学习总结 教材学习内容总结 第十六章 整合数据库 JDBC简介 1.JDBC是java联机数据库的标准规范.它定义了一组标准类与接口,标准API ...

  9. 20155303 2016-2017-2 《Java程序设计》第二周学习总结

    20155303 2016-2017-2 <Java程序设计>第二周学习总结 教材学习内容总结 『注意』 "//"为单行批注符: "/*"与&quo ...

  10. 20145237 《Java程序设计》第九周学习总结

    20145237 <Java程序设计>第九周学习总结 教材学习内容总结 第十六章 整合数据库 JDBC入门 ·数据库本身是个独立运行的应用程序 ·撰写应用程序是利用通信协议对数据库进行指令 ...

随机推荐

  1. Python_selenium之处理Alert窗

    Python_selenium之处理Alert窗 一.介绍 1. 介绍如何通过switch_to方法处理网页Alert窗口 2. 然后我们自己创建一个alert弹窗进行操作 二.测试脚本 1. 测试脚 ...

  2. python3----练习题(弹幕跟随)

    # 导入模块 import requests # 1. 网络请求 2.pip install requests import time # 用于时间控制 import random # 随机模块 产生 ...

  3. Activity公用跳转到主Activity

    public class VSession { private VSession() { } public static VSession getInstance() { if (session == ...

  4. 在asp.net页面上得到Castle容器的实例

    在项目中使用Castle IOC容器,Asp.net程序中如何得到Castle容器内. 可以如下实现: 1.Gloabal实现接口IContainerAccessor public class Glo ...

  5. xmpp muc 群聊协议 2

    Roles and Affiliations There are two dimensions along which we can measure a user's connection with ...

  6. [LintCode] 带最小值操作的栈

    class MinStack { public: MinStack() { // do initialization if necessary } void push(int number) { // ...

  7. 170220、maven国内镜像 阿里云

    maven确实是一个好东西,但是在国内下载官方仓库的jar却是个大问题,速度不敢恭维,现在oschina的国内maven镜像服务已关闭,无奈之下只能另寻门路. 今天突然发现了阿里云maven国内镜像, ...

  8. sql---字段类型转换,sql获取当前时间

    一.字段类型转换 convert(要转换成的数据类型,字段名称)例如 convert(varchar(100),col_name)Convert(int,Order_no) 二.sql获取当前时间 s ...

  9. 【转】va_list 详解

    原文出自http://www.cppblog.com/xmoss/archive/2009/07/20/90680.html VA_LIST 是在C语言中解决变参问题的一组宏 他有这么几个成员: 1) ...

  10. epoll浅析以及nio中的Selector

    出处: https://my.oschina.net/hosee/blog/730598 首先介绍下epoll的基本原理,网上有很多版本,这里选择一个个人觉得相对清晰的讲解(详情见reference) ...