javaÉú³ÉËæ»úÊý×ÖºÍ×Öĸ×éºÏ
×¢£º1.·½·¨µÄ²ÎÊý length ÊÇÉú³ÉµÄËæ»úÊýµÄ³¤¶È¡£
2. Ö»ÏëÒª´óдµÄ×Öĸ ¿ÉÒÔʹ int choice =65£» Ö»ÏëҪСдµÄ×Öĸ£¬¾Í int choice =97£»
import java.util.Random;
public String getCharAndNumr(int length)
{
String val = "";
Random random = new Random();
for(int i = 0; i < length; i++)
{
String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num"; // Êä³ö×Öĸ»¹ÊÇÊý×Ö
if("char".equalsIgnoreCase(charOrNum)) // ×Ö·û´®
{
int choice = random.nextInt(2) % 2 == 0 ? 65 : 97; //È¡µÃ´óд×Öĸ»¹ÊÇСд×Öĸ
val += (char) (choice + random.nextInt(26));
}
else if("num".equalsIgnoreCase(charOrNum)) // Êý×Ö
{
val += String.valueOf(random.nextInt(10));
}
}
return val;
}
Ïà¹ØÎĵµ£º
JDBC Name: jTDS
URL: http://jtds.sourceforge.net/
Version: 0.5.1
Download URL: http://sourceforge.net/project/showfiles.php?group_id=33291
Óï·¨:
Class.forName("net.sourceforge.jtds.jdbc.Driver
");
Connection con =
DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/datab ......
JavaµÄÄÚ´æÄ£ÐÍJMM£¨Java Memory Model£©JMMÖ÷ÒªÊÇΪÁ˹涨ÁËÏ̺߳ÍÄÚ´æÖ®¼äµÄһЩ¹Øϵ¡£¸ù¾ÝJMMµÄÉè¼Æ£¬ÏµÍ³´æÔÚÒ»¸öÖ÷ÄÚ´æ(Main Memory)£¬JavaÖÐËùÓÐʵÀý±äÁ¿¶¼´¢´æÔÚÖ÷´æÖУ¬¶ÔÓÚËùÓÐÏ̶߳¼Êǹ²ÏíµÄ¡£Ã¿ÌõÏ̶߳¼ÓÐ×Ô¼ºµÄ¹¤×÷ÄÚ´æ(Working Memory)£¬¹¤×÷ÄÚ´æÓÉ»º´æºÍ¶ÑÕ»Á½²¿·Ö×é³É£¬»º´æÖб£´æµÄÊÇÖ÷´æÖбäÁ¿µÄ¿½±´£¬»º´ ......
·´Éä»úÖÆ:ËùνµÄ·´Éä»úÖƾÍÊÇjavaÓïÑÔÔÚÔËÐÐʱӵÓÐÒ»Ïî×Ô¹ÛµÄÄÜÁ¦¡£Í¨¹ýÕâÖÖÄÜÁ¦¿ÉÒÔ³¹µ×µÄÁ˽â×ÔÉíµÄÇé¿öΪÏÂÒ»²½µÄ¶¯×÷×ö×¼±¸¡£ÏÂÃæ¾ßÌå½éÉÜÒ»ÏÂjava
µÄ·´Éä»úÖÆ¡£ÕâÀïÄ㽫µß¸²ÔÀ´¶ÔjavaµÄÀí½â¡£
JavaµÄ·´Éä»úÖƵÄʵÏÖÒª½èÖúÓÚ4¸öÀࣺclass£¬Constructor£¬F ......
ÎÒÃÇÖªµÀ£¬ÔÚJavaÖÐÉèÖñäÁ¿ÖµµÄ²Ù×÷£¬³ýÁËlongºÍdoubleÀàÐ͵ıäÁ¿ÍⶼÊÇÔ×Ó²Ù×÷£¬Ò²¾ÍÊÇ˵£¬¶ÔÓÚ±äÁ¿ÖµµÄ¼òµ¥¶Áд²Ù×÷ûÓбØÒª½øÐÐͬ²½¡£
ÕâÔÚJVM 1.2֮ǰ£¬JavaµÄÄÚ´æÄ£ÐÍʵÏÖ×ÜÊÇ´ÓÖ÷´æ¶ÁÈ¡±äÁ¿£¬ÊDz»ÐèÒª½øÐÐÌرðµÄ×¢ÒâµÄ¡£¶øËæ×ÅJVMµÄ³ÉÊìºÍÓÅ»¯£¬ÏÖÔÚÔÚ¶àÏ̻߳·¾³ÏÂ
volatile¹Ø¼ü×ÖµÄʹÓñäµÃ·Ç³£ÖØÒª¡£ÔÚµ±Ç°µÄ ......
1.ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÊ®·ÖÁ˽âUML£¬ÓÈÆäÊÇclass£¬object£¬interactionÒÔ¼°statediagrams¡£
¡¡¡¡2.ÄãÐèҪѧϰJAVAÓïÑԵĻù´¡ÖªÊ¶ÒÔ¼°ËüµÄºËÐÄÀà¿â
(collections£¬serialization£¬streams£¬networking£¬
multithreading£¬reflection£¬event£¬h ......