java¶ÁÈ¡ÍøÒ³ÐÅÏ¢
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ReadWebPage {
public static void main(String[] args) {
try {
URL url = new URL("http://www.3158.com/view/dome/lxwm.shtml");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
InputStream is = connection.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = "";
while ((line = br.readLine()) != null) {
parse(line);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private static void parse(String line) {
// »ñÈ¡ÓÊÏä
Pattern p = Pattern.compile("[\\w[.-]]+@[\\w[.-]]+\\.[\\w]+");
// »ñÈ¡ÊÖ»úºÅÂë
// Pattern p = Pattern.compile("1[3,5]\\d{9}");
Matcher m = p.matcher(line);
while (m.find()) {
System.out.println(m.group());
}
}
}
Ïà¹ØÎĵµ£º
1 ¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀൠ......
package com.svse.dao;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class UserDAO {
/*
* javaµ÷Óô洢¹ý³Ì
*/
public int addUser(String username,int userage)
{
Connection conn = null;
int useri ......
±¾ÎĽ²Êö³ÌÐò¿ª·¢ÕßÔõÑùʹÓÃNetBeans 6.8 IDEºÍJavaFX¼¼Êõ´´½¨ËûÃǵĵÚÒ»¸öJavaFXÓ¦ÓóÌÐò¡£ÔÚÎÄÕÂÖУ¬ÎÒÃǽ«´´½¨Ò»¸ö¼òµ¥µÄ´øÓÐÎı¾µÄÇòÌå¡£¸ÃÇòÌåÔÚÒ»¸öÌض¨µÄʱ¼äÖÜÆÚÄڸıäÆä͸Ã÷¶È¡£Ä㻹¿ÉÒÔʹÓÃÊó±êÍ϶¯ÇòÌå¡£
ͬÑùµÄÔÒò£¬ÒòΪÎÄÄÚÓкܶà²Ù×÷½Øͼ£¬ÕâÀï²åÈëºÜ²»·½±ã£¬ ......
µ¥ÀàÐ͵¼È루single-type-import£©£¬ÀýÈçimport java.io.File£»
¡¡¡¡°´ÐèÀàÐ͵¼È루type-import-on-demand£©£¬ÀýÈç import java.io.*£»
¡¡¡¡¹ØÓÚÕâÁ½ÖÖµ¼ÈëÀàÐÍ´ó¼Ò¸÷ÓÐËù°®£¬ÖÚ˵·×ç¡¡£ÕâÀï·ÖÎöÒ»ÏÂÕâÁ½ÖÖµ¼ÈëÀàÐ͵ĴóÖ¹¤×÷ÔÀí¹©´ó¼Ò²Î¿¼¡£
¡¡¡¡µ¥ÀàÐ͵¼Èë±È½ÏºÃÀí½â£¬½ö½öµ¼ÈëÒ»¸öpu ......
µÃ°²ÆæרÂô£¨Ô˶¯ÐÝÏÐЬ£¬°åЬ£©ÌÔ±¦Ð¡µê£ºwww.bxbshoes.com
Java ¶¨ÒåµÄλÔËË㣨bitwise operators £©Ö±½Ó¶ÔÕûÊýÀàÐ͵Äλ½øÐвÙ×÷£¬ÕâЩÕûÊýÀàÐÍ°üÀ¨long£¬int£¬short£¬char£¬and byte ¡£±í4-2 ÁгöÁËλÔËË㣺
±í4.2 λÔËËã·û¼°Æä½á¹û
ÔËËã·û ½á¹û &nb ......