¿´µ½Ô°×ÓµÄͬÁÅÃÇдµÄ¡¶¿çƽ̨¡·ÏµÁÐÖ®ºóÕæµÄÊÇÈÈѪ·ÐÌÚ£¬ÓÐЩ»°²»µÃ²»Ëµ£¬²»Äܲ»Ëµ¡£ÎÒÒª½ÒµôJavaÕâÒ»²ã²ãÃÀÀöµÄ“»Æ¤”,Èôó¼Ò¿´¿´»Æ¤Ö®Ï ÊÇʲô?ÎÒÃÇ¿´µ½µÄ¶¼ÊÇһЩʲô?ÎÒ±¾È˲¢²»ÊÇÒ»¶¨µÃÍƼö´ó¼ÒÓÃ.NETƽ̨£¬µ«ÊÇÎÒ¾ÍÊÇ¿´²»¹ÜÓÐЩÈËÎóµ¼³õѧÕߣ¬ÏòËûÃÇ´«µ¼Ê²Ã´¶¼µÃÓÃJavaд£¬Ê²Ã´ ¶¼ÊÇJava×îÅ£B¡£ÎÒÈÏΪӦ¸Ã¸ù¾ÝÏîÄ¿µÄÒªÇó¶øÑ¡Ôñƽ̨Ó뿪·¢ÓïÑÔ£¬±ÈÈç×öC/S¿ª·¢Ñ¡Ôñ.NET¾ø¶ÔÊÇÃ÷Öǵģ¬Èç¹ûÄúÐèÒª¿çƽ̨Äú¿ÉÒÔÑ¡ÓÃQTÖ®Àà µÄ£¬¸ÉÂïÆ«Æ«ÓÃSwingÄÄ?Ò²ÐíÓÃSWingÄÜÏԵóöËû±È±ðÈËÅ£?×öWEB¿ª·¢Ñ¡ÔñPHPÓ¦¸ÃÒ²ÊÇÃ÷ÖǵÄÑ¡Ôñ£¬¾ý²»¼ûÊÀ½çÉÏÁ½¸öÍøÕ¾Ö®Ò» FaceBook¾ÍÊÇÓÃPHPµÄÂð?²ÉÓÃPHP·½±ã¿ì½Ý¿ª·¢Ëٶȿ죬²¿Ê𷽱㡣ÓеÄʱºòÎÒ¶¼ºÍ±ðÈË˵ASP.NETºÍPHPÕâ¸öСÐֵܱÈÆðÀ´Ò²²î²»ÉÙÄÄ£¬ µ«ÄãÓÃJavaÀ´¿ª·¢?ºÇºÇºÇ¡£¡£ÄãÄܳԶàÉÙ¿àÎÒÏëÖ»ÓÐÄã×ÔÒÑÄÜÖªµÀ°É¡£ºÃÁË·Ï»°ÉÙ˵£¬ÎÒÃÇÀ´½Ò“»Æ¤”°É
»Æ¤Ö®Ò»£ºJavaµÄ µÍ³É±¾
JavaµÄµÍ³É±¾ÄѵÀÕæµÄºÜµÍÂð?ÊÀ½çûÓÐÎÚÍа´ó¼Ò¶¼Òª³Ô·¹ÄÄ£¬±ð×öÃÎÁË!
Ê×ÏÈÎÒÃÇÏÈÌÖÂÛËüµÄ·þÎñÆ÷£¬ºÜ¶àÈË¿ÉÄܺܿì¾Í¸øÎÒÒ»¸ö´ð¸´ËµÓÓTomcat”£¬ÐֵܰÝÍÐÄÄ!Äã ¼û¹ý´óÐÍÏîÄ¿ÓÃTOMCATÓÃ×öÖмä¼þ·þÎñÆ÷Âð?Èç¹ûÄã¸ÒÓã¬ÒªÃ´ÓÃÏîÄ¿ ......
6.·ºÐÍ:
1¡¢·ºÐ͵ÄÀàÐͲÎÊýÖ»ÄÜÊÇÀàÀàÐÍ£¨°üÀ¨×Ô¶¨ÒåÀࣩ£¬²»ÄÜÊǼòµ¥ÀàÐÍ¡£
¡¡¡¡2¡¢Í¬Ò»ÖÖ·ºÐÍ¿ÉÒÔ¶ÔÓ¦¶à¸ö°æ±¾£¨ÒòΪ²ÎÊýÀàÐÍÊDz»È·¶¨µÄ£©£¬²»Í¬°æ±¾µÄ·ºÐÍÀàʵÀýÊDz»¼æÈݵġ£
¡¡¡¡3¡¢·ºÐ͵ÄÀàÐͲÎÊý¿ÉÒÔÓжà¸ö¡£
¡¡¡¡4¡¢·ºÐ͵IJÎÊýÀàÐÍ¿ÉÒÔʹÓÃextendsÓï¾ä£¬ÀýÈç<T extends superclass>¡£Ï°¹ßÉϳÉΪ“ÓнçÀàÐÍ”¡£
¡¡¡¡5¡¢·ºÐ͵IJÎÊýÀàÐÍ»¹¿ÉÒÔÊÇͨÅä·ûÀàÐÍ¡£ÀýÈçClass<?> classType = Class.forName(java.lang.String);
Àý×Ó:
a..ʹÓÃ?ͨÅä·û¿ÉÒÔÒýÓÃÆäËû¸÷ÖÖ²ÎÊý»¯µÄÀàÐÍ£¬µ«²»Äܵ÷ÓÃÓë²ÎÊý»¯Óйصķ½·¨;
Collection<?> c = new Vector<String>();
c.add("abc");//±¨´í
c.size();//ÕýÈ·
ËùÒÔ£¬?ͨÅä·û¶¨ÒåµÄ±äÁ¿Ö÷ÒªÓÃ×÷ÒýÓ㬵÷ÓÃÓë²ÎÊý»¯Î޹صķ½·¨£¬Èç¹ûÒªµ÷ÓÃÓë²ÎÊý»¯Ïà¹ØµÄ·½·¨£¬ÄÇô±ØÐëÔÚʹÓÃ?ͨÅä·ûÒýÓÃ֮ǰµ÷Ó㬷ñÔò¾ÍÓëjava 5Ìṩ·ºÐ͵ÄÄ¿µÄ±³µÀ¶ø³ÛÁË¡£
b..ÏòÏÂÏÞ¶¨Í¨Åä·û£º
ÕýÈ·£ºVector<? extends Number> x = new Vector<Integer>();
´íÎó£ºVector<? extends Numb ......
¡¡ÔÚJavaÓïÑÔÖУ¬ abstract class ºÍinterface ÊÇÖ§³Ö³éÏóÀඨÒåµÄÁ½ÖÖ»úÖÆ¡£ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖƵĴæÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄ ÃæÏò¶ÔÏóÄÜÁ¦¡£abstract classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏ໥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½ø ÐгéÏóÀඨÒåʱ¶ÔÓÚabstract classºÍinterfaceµÄÑ¡ÔñÏԵñȽÏËæÒâ¡£Æäʵ£¬Á½ÕßÖ®¼ä»¹ÊÇÓкܴóµÄÇø±ðµÄ£¬¶ÔÓÚËüÃǵÄÑ¡ÔñÉõÖÁ·´Ó³³ö¶Ô ÓÚÎÊÌâÁìÓò±¾ÖʵÄÀí½â¡¢¶ÔÓÚÉè¼ÆÒâͼµÄÀí½âÊÇ·ñÕýÈ·¡¢ºÏÀí¡£±¾ÎĽ«¶ÔËüÃÇÖ®¼äµÄÇø±ð½øÐÐÒ»·¬ÆÊÎö£¬ÊÔͼ¸ø¿ª·¢ÕßÌṩһ¸öÔÚ¶þÕßÖ®¼ä½øÐÐÑ¡ÔñµÄÒÀ¾Ý¡£
¡¡¡¡Àí½â³éÏóÀà
¡¡¡¡abstract classºÍinterfaceÔÚJavaÓïÑÔÖж¼ÊÇÓÃÀ´½øÐгéÏóÀࣨ±¾ÎÄ ÖеijéÏóÀಢ·Ç´Óabstract class·Òë¶øÀ´£¬Ëü±íʾµÄÊÇÒ»¸ö³éÏóÌ壬¶øabstract classΪJavaÓïÑÔÖÐÓÃÓÚ¶¨Òå³éÏóÀàµÄÒ»ÖÖ·½·¨£¬ Çë¶ÁÕß×¢ÒâÇø·Ö£©¶¨ÒåµÄ£¬ÄÇôʲôÊdzéÏóÀ࣬ʹÓóéÏóÀàÄÜΪÎÒÃÇ´øÀ´Ê²Ã´ºÃ´¦ÄØ£¿
¡¡¡¡ÔÚ ÃæÏò¶ÔÏóµÄ¸ÅÄîÖУ¬ÎÒÃÇÖªµÀËùÓеĶÔÏó¶¼ÊÇͨ¹ýÀàÀ´Ãè»æµÄ£¬µ«ÊÇ·´¹ýÀ´È´²»ÊÇÕâÑù¡£²¢²»ÊÇ ËùÓеÄÀ඼ÊÇÓÃÀ´Ãè»æ¶ÔÏóµÄ£¬Èç¹ûÒ»¸öÀàÖÐûÓаüº¬×ã¹»µÄÐÅÏ¢À´Ãè»æÒ»¸ö¾ßÌåµÄ¶ÔÏó£¬ÕâÑùµÄÀà¾ÍÊdzéÏóÀà¡£³éÏóÀàÍùÍùÓÃÀ´±íÕ÷ÎÒÃÇÔÚ¶ ......
°²×°ºÃjdkÒÔºóÐèÒªÌí¼Ó»·¾³±äÁ¿,²ÅÄÜÔÚÃüÁîÐÐÖÐʹÓÃjavaÃüÁî.
ºÜ¶àÈË"ÎÊΪʲôjavacÕÒ²»µ½"¾ÍÊÇÒòΪûÌí¼Ó»·¾³±äÁ¿.
windows ÉÏ¿Éдһ¸ö.bat½Å±¾:
set JAVA_HOME=d:\Java\jdk1.6.0_20
set PATH=%PATH%;%JAVA_HOME%\bin ......
Ç°Ìì°øÍíÎÒ·¢±íÁË¡¶JavaµÄ¿çƽ̨¾ÍÊÇÒ»¾ä»ÑÑÔ¡£¡·£¬Ô±¾¾ÍÊÇÖÜÄ©ÏÐÀ´ÎÞÊ£¬·¢±íһƪÂÔ´øÕùÒéÐԵIJ©ÎÄÈôó¼Ò¶¼À´³³³³¼Ü£¬·¢±í×Ô¼ºµÄ¿´·¨£¬¸ù±¾¾ÍûÏë×ÅË°ÑË´òµ¹£¬Ò»¸öÐÐÒµ»òÕßÊǼ¼ÊõÕóÓªÊÇÎÞ·¨ÓöÌÆÚ¿ÚË®ÕÌ´òµ½¶ÔÊֵģ¬¶øÇÒÎÞÂÛ˵¹Á˶ÔË«·½ÕóÓªµÄ·ÛË¿ÃÇÒ²ÊÇÓк¦ÎÞÒæ¡£
ÎҸоõ¿ÉÒÔ¶¥µ½50Â¥£¬³öºõÒâÁϵÄÊÇ´ó¼Ò¾ÓÈ»·×·×д³ö×Ô¼ºµÄ²©ÎÄ£¬»¹±»±à¼×ö³ÉÁËרÌ⣬ÖÃÓÚÊ×ҳͷÌõ¡£
¼ÈÈ»»°ÌâÒѾ³Æð£¬ÎÒ´òËã½ñÍí·¢Æª²©ÎÄÔÙÒýµ¼Ò»ÏÂÓßÂÛ·½Ïò£¬Ê¹ËüÔÙ»ðÁ½Ì죬Å×שÒýÓñ£¬¶øÇÒÕÔ劼ÏÈÉúÒ»Ö±ÔÚ¸úÌû£¬Ê¹.NETÕóÓªµÄÎҸе½Íò·ÖÄѵá£
¸Õ¸Õ´ò¿ªÕâƪרÌ⣬ÃÍÈ»¼ûµ½HAL9000·¢±íµÄ¡¶¶ÔÓÚ´óÐ͹«Ë¾ÏîĿƽ̨ѡÔñj2eeµÄ¼¸²ãÈÏʶ¡·ÏµÁУ¬ÉîÊÜÆô·¢¡£
ÓÐһ˿¿ÉϧµÄÊÇ£¬Õâ¸öϵÁÐÌ«Ç¿ÁË£¬JavaÕóÓªµÄÅóÓѸù±¾¾ÍÊÇÑÆ¿ÚÎÞÑÔ...ÕùÂÛÖ®»ð˲¼ä±»½½Ãð£¬Õâ²»ÊÇÎÒÏëÕâôÔç¾Í¿´µ½µÄ£¬µ«ÊÇÖµÁË¡£
ͨ¹ýÕâ´Î¼¤ÁÒµÄÌÖÂÛ£¬ÎÒ´Ó´ó¼ÒÉíÉÏѧµ½ÁËÌ«¶à£¬¿ªÀ«ÁËÑ۽磬²»¹ÜÊÇÖ§³ÖÎҵĻ¹ÊÇÂîÎҵģ¬¶¼¸ÐлÄãÃÇ¡£
ͬʱҲ¸Ðл²©¿ÍÔ°¸øÎÒÃÇÕâ¸öƽ̨£¬Ò²¸Ðл²©¿ÍÔ°µÄ±à¼ÃÇ×ö³ÉרÌâÒýÀ´Õâô¶à¸ßÈËÖ¸µã¡£ ......
import java.io.File;
import java.io.FileNotFoundException;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class ResolveXmlFile {
public void resolverXml() throws DocumentException, FileNotFoundException{
//¶ÁÈ¡xmlÎļþ À´µÃµ½document
SAXReader reader = new SAXReader();
Document document = reader.read(new File("F:\\Workspaces\\DomXmlProject\\src\\T_AR_OtherBillentry.xml"));
Element root = document.getRootElement();
//Ñ»·¸ù½Úµã
for(java.util.Iterator it =root.elementIterator("columns");it.hasNext();){
Element elm=(Element)it.next();
//Ñ»·×Ó½Úµã
for(java.util.Iterator it1 = elm.elementIterator("column");it1.hasNext();){
Element elm1 =(Element)it1.next();
& ......
import java.io.File;
import java.io.FileNotFoundException;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class ResolveXmlFile {
public void resolverXml() throws DocumentException, FileNotFoundException{
//¶ÁÈ¡xmlÎļþ À´µÃµ½document
SAXReader reader = new SAXReader();
Document document = reader.read(new File("F:\\Workspaces\\DomXmlProject\\src\\T_AR_OtherBillentry.xml"));
Element root = document.getRootElement();
//Ñ»·¸ù½Úµã
for(java.util.Iterator it =root.elementIterator("columns");it.hasNext();){
Element elm=(Element)it.next();
//Ñ»·×Ó½Úµã
for(java.util.Iterator it1 = elm.elementIterator("column");it1.hasNext();){
Element elm1 =(Element)it1.next();
& ......