Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java ÕýÔò±í´ïʽ ×Ö·û´®Æ¥Åä

import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class JavaBasic {
     public static void main(String[] args){
      StringBuffer sd = new StringBuffer();
      String hhhString="adlkll";
      Pattern pattern = Pattern.compile("[A-Za-z]*");
      Matcher matcher = pattern.matcher(hhhString);
      if (matcher.matches()){
       System.out.println("·ûºÏÒªÇó");
      } else {
       System.out.println("²»·ûºÏÒªÇó");    //ÊÇ·ñ·ûºÏÕýÔò±í´ïʽÄÚÈÝ
      }
     
//      hhhString=hhhString.replace(" ", ",");
      String[] ss1=hhhString.trim().split(" ");
      System.out.println(ss1.length);
      for(int i=0;i<ss1.length;i++){
       sd.append(ss1[i]);                           //×Ö·û´®Á¬½Ó,Èç¹ûÑ¡lengsh-i,¿ÉÒÔÈ·¶¨Ñ¡µÚ¼¸¸ö×Ö·û´®
       
      }
      System.out.println(sd.toString());
     
     
     StringBuffer sb = new StringBuffer();
   String s = "  ab ce as";
      String[] ss =s.trim().split(" ");
      System.out.println(ss.length);
      for(int i=0;i<ss.length;i++){
       sb.append(ss[i]);                            //ÏÔʾȫ²


Ïà¹ØÎĵµ£º

java·ºÐ͵ÄÀí½â

·ºÐÍÊÇJava SE 1.5µÄÐÂÌØÐÔ£¬·ºÐ͵ı¾ÖÊÊDzÎÊý»¯ÀàÐÍ£¬Ò²¾ÍÊÇ˵Ëù²Ù×÷µÄÊý¾ÝÀàÐͱ»Ö¸¶¨ÎªÒ»¸ö²ÎÊý¡£ÕâÖÖ²ÎÊýÀàÐÍ¿ÉÒÔÓÃÔÚÀà¡¢½Ó¿ÚºÍ·½·¨µÄ´´½¨ÖУ¬·Ö±ð³ÆΪ·ºÐÍÀà¡¢·ºÐͽӿڡ¢·ºÐÍ·½·¨¡£
¡¡¡¡JavaÓïÑÔÒýÈë·ºÐ͵ĺô¦ÊÇ°²È«¼òµ¥¡£
¡¡¡¡ÔÚJava SE 1.5֮ǰ£¬Ã»ÓзºÐ͵ÄÇé¿öµÄÏ£¬Í¨¹ý¶ÔÀàÐÍObjectµÄÒýÓÃÀ´ÊµÏÖ²ÎÊýµÄ“È ......

java ÃæÊÔÌâ59µÀ£¨º¬²Î¿¼´ð°¸£©


Java
»ù´¡·½Ãæ
:
 
1
¡¢×÷ÓÃÓò
public,private,protected,
ÒÔ¼°²»Ð´Ê±µÄÇø±ð
´ð£º
Çø±ðÈçÏ£º
×÷ÓÃÓò
           
µ±Ç°Àà
       
ͬһ
package  
×ÓËïÀà
     &n ......

ÈçºÎʹÓÃProxyģʽ¼°JavaÄÚ½¨µÄ¶¯Ì¬´úÀí»úÖÆ

1.Proxy
ģʽ
´úÀíģʽ֧³Ö½«Ä³Ð©²Ù×÷´Óʵ¼ÊµÄ¶ÔÏóÖзÖÀë³öÀ´£¬Í¨¹ýËüµÄ´úÀíÀàÌṩ´¦Àí¡£ÕâÑù±ãÓÚÐ޸ĺ͹ÜÀíÕâЩÌض¨µÄ²Ù×÷¡£
ÏÂÃæʾÀýÒ»¸ö´úÀíģʽµÄʵÏÖ¡£
<<interface>>Subject.java
package
com.zj.proxy;
 
public

interface
Subject {
   
void
operation1();
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ