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. Windows 8.1 浏览器中 SkyDrive 的改名与隐藏

    在 Windows 8.1 中已经整合了 SkyDrive ,在中文版中 SkyDrive 的名字总是感觉不协调,可是在属性里面可以调整位置却不能修改名称,怎么办呢? 打开注册表,找到 HKEY_CL ...

  2. [LeetCode] Factorial Trailing Zeros

    Well, to compute the number of trailing zeros, we need to first think clear about what will generate ...

  3. 170206、sping注解@autowired和@resource的区别

    新年第一天上班,新的一年,我们17加油!!! @Resource的作用相当于@Autowired,只不过@Autowired按byType自动注入,而@Resource默认按 byName自动注入罢了 ...

  4. CodeForces 157B Trace

    B. Trace time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...

  5. StackExchange.Redis性能调优

    大家经常出现同步调用Redis超时的问题,但改成异步之后发现错误非常少了,但却可能通过前后记日志之类的发现Redis命令非常慢. PS: 以后代码都在Windows bash中运行,StackExch ...

  6. Gson 解析多层嵌套JSON数据

    http://stackoverflow.com/questions/14139437/java-type-generic-as-argument-for-gson

  7. java容器的线程安全性

    参考:https://www.cnblogs.com/yjd_hycf_space/p/7760248.html 线程安全的: Vector HashTable StringBuffer 线程不安全的 ...

  8. vue-cli注册全局组件

    在main.js开头引入组件,然后注册组件,例如: import Vue from 'vue' import VueRouter from 'vue-router' import VueResourc ...

  9. 我的Android进阶之旅------>Java全角半角的转换方法

    一中文全角和半角输入的区别 1全角指一个字符占用两个标准字符位置 2半角指一字符占用一个标准的字符位置 3全角与半角各在什么情况下使用 4全角和半角的区别 5关于全角和半角 6全角与半角比较 二转半角 ...

  10. Android-BoundService

    Android-BoundService 一 binder 内核->字符设备binder(负责进程间通信的驱动)->servicemanager->binder类->binge ...