Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java jdk5µÄ·ºÐÍÉùÃ÷

 ·ºÐÍÉùÃ÷¾ÍÊÇ·º·ºµÄÉùÃ÷ÀàÐÍ¡£ÎÒÃÇÓÃÆäËüµÄÓïÑÔ×öÒ»¸ö±È½Ï£º
JavascriptÉùÃ÷±äÁ¿£º var i= 1;var c = ‘char ’
VB ÉùÃ÷±äÁ¿£º dim i=1;dim c=’char’
Perl ÉùÃ÷±äÁ¿£º $i = 1; $c = ‘char’
ÕâЩ½Å±¾ÓïÑÔ£¬ÔÚÉùÃ÷±äÁ¿µÄʱºò£¬¸ù±¾¾Í²»ÏëjavaÄÇÑù»¹µÃÉùÃ÷ÀàÐÍ¡£ËûÃǵÄÀàÐÍÒѾ­×Ô¼ºÉùÃ÷ÍêÁË£¬ÊÇ·º·ºµÄÉùÃ÷µÄ£¬ÕâЩÓïÑÔ±¾Éí¾ÍÊÇ·ºÐÍ¡£ÒòΪÊý¾ÝÀàÐÍ¿ÉÄÜ»á¸Ä±ä£¬ËùÒÔÓò»×ÅÏñjava¶¨µÄÄÇôËÀ¡£µ«ÊÇÊý¾ÝÀàÐͿɲ»ÊÇ˵±ä¾Í±äµÄ£¬javaµÄÇ¿ÀàÐÍ»úÖÆ£¬±£Ö¤ÁËÂß¼­µÄÑϽ÷ÐÔ£¬¶øÇÒÈ·±£×ųÌÐòÔ±·¸´íÎó£¬ÕâÊÇjavaµÄÓŵ㡣ͬʱʹµÃËü¿ª·¢ÆðÀ´Ã»ÓÐÉÏÊöÓïÑÔÄÇÑù¼òµ¥£¬Ò»µãСÊÂÉÏ×öÆðÀ´¶¼ºÜ±¿×¾¡£ÕâÊÇÆäÖÐÒ»¸ö·½Ã棬ÁíÒ»¸ö·½ÃæÈçÎÒÃÇÉϽڽ²µÄjavaµÄ¼¯ºÏÀàÀïÃæµÄÀàÐÍÊDz»È·¶¨µÄ£¬·Åʲô¶¼Ðа¡¡£ÕâÑùµÄ»°ÄãÃ÷Ã÷×Ô¼º·Å½øÈ¥µÄÀàÐÍ£¬Ò²¾ÍÊÇ˵Äã×Ô¼ºÒѾ­ÖªµÀÀàÐÍÁË£¬ÄóöÀ´µÄʱºò£¬»¹µÃ²»¶ÏµÄת»»¡£ÎÒÃÇÔÚ½éÉܲðÏäÓë×°Ïä»úÖƵÄʱºòÒѾ­Ëµ¹ýÕâ¸öÀàÐ͵ÄÎÊÌâÁË¡£²ðÏäÓë×°ÏäȷʵÄܽâ¾ö²»ÉÙÎÊÌ⵫ÄÇÊDz»¹»µÄ¡£
ËùÒÔ½Ó×ÅÉϽڿÎѧ¼¯ºÏÀàµÄ¾¢Í·£¬³ÃÈÈ´òÌú¡£ÎÒÃǽ²Ò»Ï¸ղÅ˵µÄµÚ¶þ¸ö·½Ã棬¹ØÓÚ¼¯ºÏÀàµÄÎÊÌâ¡£ÎÒÃǸղÅ˵£¬javaÕâÖÖÀàÐÍ°²È«Ö®ÏµÄÆÆÕÀ£¬ÎÒÃÇÒªÓ÷ºÐ͵ķ½Ê½À´ÃÖ²¹¡£ÎÒÃÇÀ´Êµ¼ùÒ»¸öÀý×Ó¡£Êµ¼ù£º
import java.io.IOException;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public class GenericsTester {
public void testTypeSafeMaps(PrintStream out) throws IOException {
Map<Integer, Integer> squares = new HashMap<Integer, Integer>();
for (int i=0; i<100; i++) {
squares.put(i, i*i);
}
for (int i=0; i<10; i++) {
int n = i*3;
out.println(n + "µÄƽ·½ÊÇ" + squares.get(n));
}
}
//²âÊÔ°²È«µÄÁ´±í
public void testTypeSafeLists(PrintStream out) throws IOException {
List listOfStrings = getListOfStrings();
for (Iterator i = listOfStrings.iterator(); i.hasNext(); ) {
String item = (String)i.next();
}
List<String> onlyStrings = new LinkedList<String>();
onlyStrings.add("Legal addition");
/**
* Uncomment these two lines for an error
onlyStrings.add(new StringBuilder("Illegal Addition"));
onl


Ïà¹ØÎĵµ£º

java»·¾³±äÁ¿

@echo off&setlocal enabledelayedexpansion  
:begin  
cls  
set/p path_=ÇëÊäÈëÄãÒªÌí¼ÓµÄ»·¾³±äÁ¿µÄ·¾¶£º  
if not defined path_ goto error  
for,/f,"skip=4 tokens=1,2,*",%%a,in,('reg query "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Sess ......

javaÊý¾ÝÀàÐÍת»»

 Ò»Ð©³õѧJAVAµÄÅóÓÑ¿ÉÄÜ»áÓöµ½JAVAµÄÊý¾ÝÀàÐÍÖ®¼äת»»µÄ¿àÄÕ£¬ÀýÈ磬ÕûÊýºÍfloat,doubleÐÍÖ®¼äµÄת»»£¬ÕûÊýºÍStringÀàÐÍÖ®¼äµÄת»»£¬ÒÔ¼°´¦Àí¡¢ÏÔʾʱ¼ä·½ÃæµÄÎÊÌâµÈ¡£ÏÂÃæ±ÊÕ߾Ϳª·¢ÖеÄһЩÌå»á½éÉܸø´ó¼Ò¡£
ÎÒÃÇÖªµÀ£¬JavaµÄÊý¾ÝÀàÐÍ·ÖΪÈý´óÀ࣬¼´²¼¶ûÐÍ¡¢×Ö·ûÐͺÍÊýÖµÐÍ£¬¶øÆäÖÐÊýÖµÐÍÓÖ·ÖΪÕûÐͺ͸¡µãÐÍ£»Ïà¶Ô ......

Ó²»Ø³µ¡¢Èí»Ø³µ¡¢javaתÒå×Ö·û

 Èí»Ø³µ£¨Soft Return£©£ºÈí»Ø³µÊÇÔÚ×Ö´¦Àí³ÌÐòÖÐ×÷Ϊ×Ô¶¯ÒÆÐй¦ÄܵÄÒ»²¿·Ö×Ô¶¯²åÈëµÄ£¬Ò²½Ð»»Ðзû£¬ÔÚwordÖп´²»¼û¡£Èç¹ûÎı¾
Ò»Ðеij¤¶È³¬¹ýÎĵµËù¶¨ÒåµÄÓұ߾àʱ£¬¼´µ±Ç°ÐÐûÓÐ×ã¹»µÄ¿Õ¼ä·ÅÖÃÏÂÒ»¸ö×Ö·ûʱ£¬ÎÄ×Ö´¦ÀíÈí¼þ½«ÔÚÕâÒ»ÐÐÎı¾µÄĩβ×Ô¶¯²åÈëÒ»
¸öÈí»Ø³µ·û£¬Îı¾ÁíÆðÒ»ÐС£Õâ¸öÈí»Ø³µ·ûÊÇÓɱ༭³ÌÐò×Ô¶¯² ......

java jdk5Öз½·¨µÄÖØÔØÓëÖØд

  JavaÓïÑÔÖеĸÅÄî¾ÍÊǶ࣬Õâ»ØÓÖÓÐÁ½¸ö¸ÅÄÖØÔغÍÖØд¡£ÕâÊÇÁ½¸öиÅÄҲÊÇÁ½¸öÁî³õѧÕßÈÝÒ×»ìÏýµÄ¸ÅÄî¡£ËûÃǵĸÅÄî½ØÈ»²»Í¬£¬Ö»²»¹ý¶¼Óиö“ÖØ”×Ö£¬¾ÍÒÔΪÊǺÜÏñµÄ¡£ÏÂÃæ½âÊÍÒ»ÏÂÕâÁ½¸ö¸ÅÄ
·½·¨ÖØÔØ(overloading method) ÊÇÔÚÒ»¸öÀàÀïÃ棬·½·¨Ãû×ÖÏàͬ£¬¶ø²ÎÊý²»Í¬¡£·µ»ØÀàÐÍÄØ£¿¿ÉÒÔÏàͬҲ¿ÉÒÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ