ѧϰjavaµÄ30¸öÄ¿±ê
1.ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÊ®·ÖÁ˽âUML£¬ÓÈÆäÊÇclass£¬object£¬interactionÒÔ¼°statediagrams¡£
¡¡¡¡2.ÄãÐèҪѧϰJAVAÓïÑԵĻù´¡ÖªÊ¶ÒÔ¼°ËüµÄºËÐÄÀà¿â(collections£¬serialization£¬streams£¬networking£¬ multithreading£¬reflection£¬event£¬handling£¬NIO£¬localization£¬ÒÔ¼°ÆäËû)¡£
¡¡¡¡3.ÄãÓ¦¸ÃÁ˽âJVM£¬classloaders£¬classreflect£¬ÒÔ¼°À¬»ø»ØÊյĻù±¾¹¤×÷»úÖƵȡ£ÄãÓ¦¸ÃÓÐÄÜÁ¦·´±àÒëÒ»¸öÀàÎļþ²¢ÇÒÃ÷°×һЩ»ù±¾µÄ»ã±àÖ¸Áî¡£
¡¡¡¡4.Èç¹ûÄ㽫Ҫд¿Í»§¶Ë³ÌÐò£¬ÄãÐèҪѧϰWEBµÄСӦÓóÌÐò(applet)£¬±ØÐèÕÆÎÕGUIÉè¼ÆµÄ˼ÏëºÍ·½·¨£¬ÒÔ¼°×ÀÃæ³ÌÐòµÄSWING£¬AWT£¬ SWT¡£Ä㻹Ӧ¸Ã¶ÔUI²¿¼þµÄJAVABEAN×é¼þģʽÓÐËùÁ˽⡣JAVABEANSÒ²±»Ó¦ÓÃÔÚJSPÖÐÒÔ°ÑÒµÎñÂß¼´Ó±íÏÖ²ãÖзÖÀë³öÀ´¡£
¡¡¡¡5.ÄãÐèҪѧϰjavaÊý¾Ý¿â¼¼Êõ£¬ÈçJDBCAPI²¢ÇÒ»áʹÓÃÖÁÉÙÒ»ÖÖpersistence/ORM¹¹¼Ü£¬ÀýÈçHibernate£¬JDO£¬ CocoBase£¬TopLink£¬InsideLiberator(¹ú²úJDOºì¹¤³§Èí¼þ)»òÕßiBatis¡£
¡¡¡¡6.Ä㻹Ӧ¸ÃÁ˽â¶ÔÏó¹ØϵµÄ×迹ʧÅäµÄº¬Ò壬ÒÔ¼°ËüÊÇÈçºÎÓ°ÏìÒµÎñ¶ÔÏóµÄÓë¹ØϵÐÍÊý¾Ý¿âµÄ½»»¥£¬ºÍËüµÄÔËÐнá¹û£¬»¹ÐèÒªÕÆÎÕ²»Í¬µÄÊý¾Ý¿â²úÆ·ÔËÓ㬱ÈÈç:oracle£¬mysql£¬mssqlserver¡£
¡¡¡¡7.ÄãÐèҪѧϰJAVAµÄɳºÐ°²È«Ä£Ê½(classloaders£¬bytecodeverification£¬managers£¬policyandpermissions£¬
codesigning£¬ digitalsignatures£¬cryptography£¬certification£¬Kerberos£¬ÒÔ¼°ÆäËû)»¹Óв»Í¬µÄ°²È«/ÈÏÖ¤ API£¬ÀýÈçJAAS(JavaAuthenticationandAuthorizationService)£¬JCE (JavaCryptographyExtension)£¬JSSE(JavaSecureSocketExtension)£¬ÒÔ¼°JGSS (JavaGeneralSecurityService)¡£
¡¡¡¡8.ÄãÐèҪѧϰServlets£¬JSP£¬ÒÔ¼°JSTL(StandardTagLibraries)ºÍ¿ÉÒÔÑ¡ÔñµÄµÚÈý·½TagLibraries¡£
¡¡¡¡9.ÄãÐèÒªÊìϤÖ÷Á÷µÄÍøÒ³¿ò¼Ü£¬ÀýÈçJSF£¬Struts£¬Tapestry£¬Cocoon£¬WebWork£¬ÒÔ¼°ËûÃÇÏÂÃæµÄÉ漰ģʽ£¬ÈçMVC/MODEL2¡£
¡¡¡¡10.ÄãÐèҪѧϰÈçºÎʹÓü°¹ÜÀíWEB·þÎñÆ÷£¬ÀýÈçtomcat£¬resin£¬Jrun£¬²¢ÇÒÖªµÀÈçºÎÔÚÆä»ù´¡ÉÏÀ©Õ¹ºÍά»¤WEB³ÌÐò¡£
¡¡11.ÄãÐèҪѧϰ·Ö²¼Ê½¶ÔÏóÒÔ¼°Ô¶³ÌAPI£¬ÀýÈçRMIºÍRMI/IIOP¡£
¡¡¡¡12.ÄãÐèÒªÕÆÎÕ¸÷ÖÖÁ÷ÐÐÖмä¼þ¼¼Êõ±ê×¼ºÍÓëjava½áºÏʵÏÖ£¬±ÈÈçTuxedo¡¢CROBA£¬µ±È»Ò²°üÀ¨javaEE±¾Éí¡£
¡¡¡¡13.ÄãÐèҪѧ
Ïà¹ØÎĵµ£º
1¡¢StringÊÇ×î»ù±¾µÄÊý¾ÝÀàÐÍÂð?
»ù±¾Êý¾ÝÀàÐÍ°üÀ¨byte¡¢int¡¢char¡¢long¡¢float¡¢double¡¢booleanºÍshort¡£
java.lang.StringÀàÊÇfinalÀàÐ͵ģ¬Òò´Ë²»¿ÉÒԼ̳ÐÕâ¸öÀà¡¢²»ÄÜÐÞ¸ÄÕâ¸öÀࡣΪÁËÌá¸ßЧÂʽÚÊ¡¿Õ¼ä£¬ÎÒÃÇÓ¦¸ÃÓÃStringBufferÀà
2¡¢int ºÍ Integer ÓÐʲôÇø±ð
Java ÌṩÁ½ÖÖ²»Í¬µÄÀàÐÍ£ºÒýÓÃÀàÐͺÍÔʼÀàÐÍ£¨ ......
System.currentTimeMillis()£º¿ÉÒÔÌáÈ¡µ½µ±Ç°Ê±¼äµÄºÁÃëÊý£¬²úÉúÒ»¸öµ±Ç°µÄºÁÃ룬Õâ¸öºÁÃëÆäʵ¾ÍÊÇ×Ô1970Äê1ÔÂ1ÈÕ0ʱÆðµÄºÁÃëÊý¡£
³£¼û×÷ÓãºÒ»°ã¶¼ÊÇÓÃ2¸öʱ¼äµÄ²îÖµÀ´µÃµ½ÔËÐÐʱ¼äµÄ£¬³£ÓÃÀ´±È½Ï2¸öËã·¨µÄЧÂÊ£¡
long start = System.currentTimeMillis();
// ÕâÀï¿ÉÒÔ¼ÓÉÏÄãÒªÖªµÀµÄ·½·¨ÔËÐеÄʱ¼ä£¡£¡
......
package com.lovo.cq.shopping10_1.common;
import java.sql.*;
public class DbUtil {
private PreparedStatement pstmt = null;
private Connection con = null;
public DbUtil() {
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://l ......
×¢£º1.·½·¨µÄ²ÎÊý length ÊÇÉú³ÉµÄËæ»úÊýµÄ³¤¶È¡£
2. Ö»ÏëÒª´óдµÄ×Öĸ ¿ÉÒÔʹ int choice =65£» Ö»ÏëҪСдµÄ×Öĸ£¬¾Í int choice =97£»
import java.util.Random;
public String getCharAndNumr(int length)
{
String val = " ......
Hibernate Ö®¸¸ Gavin King[1]½¨Ò鿪·¢ÕßÉý¼¶µ½ Java EE 6 ƽ̨£¬²¢Ö¸³ö£¬Ä¿Ç°¸÷ÖÖ²»Ô¸ÒâÉý¼¶µÄ¹ÛµãÆäʵÊÇûÓиù¾ÝµÄ¡£
Java EE 6 ·¢²¼ºó£¬ÎÒ¿´µ½Á˺ܶ෴¶ÔÉý¼¶µ½ÐÂƽ̨µÄ¹Ûµã¡£ÕâЩ·´¶Ô¹Ûµã´ó¶àÊÇÓÉ Tomcat / Jetty ÒÔ¼°Ò»Ð©¿ªÔ´¿ò¼Ü£¨ÀýÈç Hibernate Óë Spring£©µÄʹÓÃÕßÌá³ö¡£
µ±È»£¬Ñ¡Ôñ·Ç±ê×¼¡¢¿ªÔ´¼¼ÊõÓкܶàºÃ´¦¡ ......