Java¾«µäÃæÊÔÌâÍƼö¶þ(´ó¼Ò¿ÉÒÔ°Ñ×Ô¼ºµÄ´ð°¸¸½ÉÏ)
***´ËÌâÒÔ¿¼²ì»ù´¡Îª×¼,±±¾©µÄ±ÊÊÔÌâ,¿ÉÄÜÓÐÈË×ö¹ý
Ìâ:дһ¸ö³ÌÐò£¬½âÎöÈçϸñʽµÄ×Ö·û´®£¬²¢½«½âÎöµÄÊý×ÖÐòÁдòÓ¡³öÀ´¡£
×Ö·û´®¸ñʽ¾ÙÀý£º -1~2, 3~3, 5~10, 7~15x3
~ ´ú±íÊý×ֵķ¶Î§£¬ -1~2 ´ú±í´Ó-1¿ªÊ¼µ½2Ö®¼äµÄËùÓÐÊý×Ö¡£ 3~3 ´ú±í´Ó3¿ªÊ¼µ½3µÄËùÓÐÊý×Ö£¬Ò²¾ÍÊÇ3
7~15x3´ú±í´Ó7¿ªÊ¼£¬×î´óΪ15£¬Ã¿¸ô3¸öÊý×ÖÈ¡Ò»¸öÊý×Ö£¬ËùÒÔ7~15x3´ú±í 7 10 13 Èý¸öÊý×Ö¡£
ËùÒÔÉÏÃæµÄ¾ÙÀý×Ö·û´®´ú±í -1 0 1 2 3 5 6 7 8 9 10 7 10 13 ÕâÑùµÄÊý×ÖÐòÁÐ
¸öÈË´ð°¸,Ö»×÷¼òµ¥ÑéÖ¤,½ö¹©²Î¿¼;Ï£Íû´ó¼ÒÄܹ»°Ñ×Ô¼ººÃµÄ·½·¨Ëã·¨Óë³öÀ´¹²Í¬Ñ§Ï°,ÓÈÆäÒ²ÔÚÃæÊÔµÄÅóÓÑ.
import java.util.StringTokenizer;
public class StringTokenTest {
public static void test1(StringTokenizer st1) {
int[] arr = new int[2];
int i = 0;
while (st1.hasMoreTokens()) {
arr[i] = Integer.parseInt(st1.nextToken());
i++;
}
if (arr[0] > arr[1]) {
System.out.println("·¶Î§ÓÐÎó£¬Çë²éÖ¤£¡");
return;
}
for (int j = arr[0]; j <= arr[1]; j++) {
System.out.print(j + " ");
}
}
public static void test2(StringTokenizer st1) {
int[] arr = new int[3];
int i = 0;
while (st1.hasMoreTokens()) {
arr[i] = Integer.parseInt(st1.nextToken());
i++;
}
if (arr[0] > arr[1]) {
System.out.println("·¶Î§ÓÐÎó£¬Çë²éÖ¤£¡");
return;
}
for (int j = arr[0]; j <= arr[1] ; j++) {
if (j % arr[2] == 0) {
System.out.print(j + " ");
}
}
}
public static void main(String[] args) {
String str = "-1¡«3,2¡«2,3¡«7*3,12¡«25*4";
StringTokenizer st = new StringTokenizer(str, ",");
while (st.hasMoreTokens()) {
String s = s
Ïà¹ØÎĵµ£º
ÕâƪÎÄÕ²¢Ã»Óиø³öÈçºÎʹÓÃResultSetµÄ¾ßÌåÀý×Ó£¬Ö»ÊÇ´ÓResultSetµÄ¹¦ÄÜÐÔÉϽøÐÐÁËÏêϸµÄ½²Êö¡£Ï£ÍûÕâƪÎÄÕ¶Դó¼ÒÀí½âResultSetÄܹ»ÓÐËù°ïÖú¡£ÏÂÃæ¾ÍÊÇÕâƪÎÄÕµľßÌåÄÚÈÝ¡£
½á¹û¼¯(ResultSet)ÊÇÊý¾ÝÖвéѯ½á¹û·µ»ØµÄÒ»ÖÖ¶ÔÏ󣬿ÉÒÔ˵½á¹û¼¯ÊÇÒ»¸ö´æ´¢²éѯ½á¹ûµÄ¶ÔÏó£ ......
Java
Java£¬ÊÇÓÉSun Microsystems¹«Ë¾ÓÚ1995Äê5ÔÂÍƳöµÄJava³ÌÐòÉè¼ÆÓïÑÔºÍJavaƽ̨µÄ×ܳơ£ÓÃJavaʵÏÖµÄHotJavaä¯ÀÀÆ÷£¨Ö§³ÖJava applet£©ÏÔʾÁËJavaµÄ÷ÈÁ¦£º¿çƽ̨¡¢¶¯Ì¬µÄWeb¡¢Internet¼ÆËã¡£´Ó´Ë£¬Java±»¹ã·º½ÓÊܲ¢Íƶ¯ÁËWebµÄѸËÙ·¢Õ¹£¬³£ÓõÄä¯ÀÀÆ÷ÏÖÔÚ¾ùÖ§³ÖJava applet¡£
¡¡¡¡Javaƽ̨ÓÉJavaÐéÄâ»ú£¨Java Virt ......
SQL×¢ÈëÊÇ×î³£¼ûµÄ¹¥»÷·½Ê½Ö®Ò»,Ëü²»ÊÇÀûÓòÙ×÷ϵͳ»òÆäËüϵͳµÄ©¶´À´ÊµÏÖ¹¥»÷µÄ,¶øÊdzÌÐòÔ±ÒòΪûÓÐ×öºÃÅжÏ,±»²»·¨
Óû§×êÁËSQLµÄ¿Õ×Ó,ÏÂÃæÎÒÃÇÏÈÀ´¿´ÏÂʲôÊÇSQL×¢Èë:
±ÈÈçÔÚÒ»¸öµÇ½½çÃæ,ÒªÇóÓû§ÊäÈëÓû§ÃûºÍÃÜÂë:
& ......
¹¤×÷ÖÐÓöµ½ÐèÒªºÏ²¢XMLµÄÎÊÌ⣬Ëì´ÓÍøÉϲéÕÒÏà¹Ø×ÊÁÏ£¬
1¡¢ ¡¶ XML merging made easy
¡·
2 ¡¢¡¶javaÖкϲ¢xmlÎĵµµÄÉè¼ÆÓëʵÏÖ
¡·
²âÊÔºó·¢ÏÖ¾ù²»·ûºÏʵ¼ÊÐèÇó£¬Êµ¼ÊÐèÇóÈçÏ£º
file1.xml:
<root>
<a>
<b name="1"/>
</a>
<d /& ......
Java ÓïÑÔÊÇÒ»ÖÖ¾ßÓж¯Ì¬ÐԵĽâÊÍÐͱà³ÌÓïÑÔ£¬µ±Ö¸¶¨³ÌÐòÔËÐеÄʱºò£¬ Java ÐéÄâ»ú¾Í½«±àÒëÉú³ÉµÄ . class Îļþ°´ÕÕÐèÇóºÍÒ»¶¨µÄ¹æÔò¼ÓÔؽøÄڴ棬²¢×éÖ¯³ÉΪһ¸öÍêÕûµÄ Java Ó¦ÓóÌÐò¡£ Java ÓïÑÔ°Ñÿ¸öµ¥¶ÀµÄÀà Class ºÍ½Ó¿Ú Implements ±àÒë³Éµ¥¶ÀµÄÒ»¸ö . class Îļþ£¬ÕâЩÎļþ¶ÔÓÚ Java ÔËÐл·¾³À´Ëµ¾ÍÊÇÒ»¸ö¸ö¿ÉÒÔ¶¯Ì¬ ......