Effective Java ѧϰ±Ê¼Ç(4)
Õâ¸öÔÔòºÜ¼òµ¥£¬¾ÍÊÇʹÓÃ˽Óй¹Ô캯Êý·ÀÖ¹À౻ʵÀý»¯¡£
ÓÐʱ£¬ÎÒÃÇ»áдһЩ¹¤¾ßÀ࣬Èçjava.lang.Math »òÊÇ java.util.Arrays, ÕâЩÀàÖж¼ÊǾ²Ì¬º¯Êý£¬ÔÚÉè¼ÆµÄʱºò£¬ÕâЩÀಢ²»ÊÇÓÃÀ´±»ÊµÀý»¯µÄ¡£Õâ¸öʱºò£¬¾ÍºÜÓбØÒª°Ñ¹¹Ô캯Êý˽Óл¯¡£
public class UtilityClass {
private UtilityClass() {
throw new AssertionError();
}
}
¸ü±£ÏÕµÄÊÇÔÚ¹¹Ô캯ÊýÖÐÅ׸öÒì³£¡£
µ±È»£¬ÕâÖÖ·½·¨µÄȱµã»¹ÊÇÓеģ¬¾ÍÊÇÕâ¸öÀ಻Äܱ»¼Ì³ÐÁË¡£
Ïà¹ØÎĵµ£º
ÔÚ Java ³ÌÐòÖÐʹÓöàÏß³ÌÒª±ÈÔÚ C »ò C++ ÖÐÈÝÒ׵ö࣬ÕâÊÇÒòΪ Java ±à³ÌÓïÑÔÌṩÁËÓïÑÔ¼¶µÄÖ§³Ö¡£±¾ÎÄͨ¹ý¼òµ¥µÄ±à³ÌʾÀýÀ´ËµÃ÷ Java ³ÌÐòÖеĶàÏß³ÌÊǶàôֱ¹Û¡£¶ÁÍê±¾ÎÄÒÔºó£¬Óû§Ó¦¸ÃÄܹ»±àд¼òµ¥µÄ¶àÏ̳߳ÌÐò¡£
¡¡¡¡ÎªÊ²Ã´»áÅŶӵȴý£¿
¡¡¡¡ÏÂÃæµÄÕâ¸ö¼òµ¥µÄ Java ³ÌÐòÍê³ÉËÄÏî²»Ïà¹ØµÄÈÎÎñ¡£ÕâÑùµÄ³ÌÐòÓе¥¸ö¿ØÖ ......
¹¤×÷̨´°¿ÚµÄEditorÇøÓòĬÈÏÊÇÏÔʾµÄ£¬¶øÇÒËüÖ§³ÖÍÏק²Ù×÷¡£ÔÚEclipseÀïÃ棬°ÑÒ»¸öÎļþÍϵ½EditorÇøÓò£¬¾Í»á×Ô¶¯´ò¿ª¸ÃÎļþµÄ
Editor.¸ÃÌØÐÔÊÇÔÚIWorkbenchWindowConfigurer ÖÐÉèÖá£
ÔÚPassWord GateÖУ¬µ±Í϶¯Password Gate ViewÖеÄÒ»¸öGroup »òÕß
Serviceµ½EditorÇøÓò£¬»áÔÚEditorÏÔʾ¸Ã ......
java socketͨÐÅ
TCP¿Í»§¶Ë£º
import java.net.*;
import java.io.*;
public class Client {
static Socket server;
public static void main(String[] args) throws Exception {
server = new Socket(InetAddress.getLocalHost(), 23);
BufferedReader in = new BufferedReader(new InputStreamReader ......
package com.yzy;
import java.util.regex.*;
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
Pattern p=Pattern.compile("^[a-z]+");
Matcher m=p.matcher("a233"); //true
//Matcher m=p.matcher("2233") ......