Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¶Ô¸÷ÖÖÎļþµÄ²Ù×÷Ïê½â

 javaÖÐÌṩÁËioÀà¿â£¬¿ÉÒÔÇáËɵÄÓÃjavaʵÏÖ¶ÔÎļþµÄ¸÷ÖÖ²Ù×÷¡£ÏÂÃæ¾ÍÀ´ËµÒ»ÏÂÈçºÎÓÃjavaÀ´ÊµÏÖÕâЩ²Ù×÷¡£

н¨Ä¿Â¼<%@ page contentType="text/html;charset=gb2312"%>
<%
//String URL = request.getRequestURI();
String filePath="C:\\²âÊÔ\\";
filePath=filePath.toString(); ......

JavaÖظ´Ï´ÅÆ

 import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public class ShuffleTest {
  public static void main(String args[]) {
    String simpsons[ ......

Java¶ÁÈ¡Îļþ(ÒÔºó¼ÌÐøÌí¼Ó)

package cf.java.study.java.io;
import java.io.File;
import java.io.FileInputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class FileTests {
@Before
public void set ......

ʹÓÃJavaµÄ´úÀí»úÖƽøÐÐÈÕÖ¾Êä³ö

ʾÀý´úÂëÈçÏÂ:
//LogProxy.java
package com.gc.action;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
public class LogProxy implements InvocationHandler{
 private ......

Java½Ó¿ÚµÄ×÷Óü°ÊµÀý

 -
½üÈÕÔÚ±à³ÌÖÐÓõ½½Ó¿Ú֪ʶ,ÓÉÓڿα¾ÖжԽӿÚÃèÊö½ÏÉÙ,ËùÒÔÏë´ÓÍøÉϲéÕÒ×ÊÁÏ,µ«ÍøÉϵÄ×ÊÁÏ´ó¶àÒ²Ö»ÊÇÈß³¤µÄÃèÊö,ËùÒÔÔÚ´ËÌṩһ×Ô¼ºÐ´µÄʵÀý,¹©´ó¼Ò²Î¿¼:
Ô­ÌâÊÇÕâÑùµÄ£ºÔÚjavaÖУ¬¶¨ÒåÒ»¸ö½Ó¿Ú£¬ÉùÃ÷¼ÆË㳤·½ÐÎÃæ»ýºÍÖܳ¤µÄ³éÏó·½·¨£¬ÔÙÓÃÒ»¸öÀàȥʵÏÖÕâ¸ö½Ó¿Ú£¬ÔÙ±àдһ¸ö²âÊÔÀàȥʹÓÃÕâ¸ö½Ó¿Ú¡£
Ê×ÏÈ£¬½Ó¿Ú±ØÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ