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

javaÖжÑÓëÕ»µÄÇø±ð

JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄ(¶ÔÏó´ÓÖзÖÅä¿Õ¼ä¡£ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈ Ö¸ÁÁ¢£¬ËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµÄÊÍ·Å¡£¶ÑÊÇÓÉÀ¬»ø»ØÊÕÀ´¸ºÔðµÄ£¬¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅäÄÚ´æ´óС£¬Éú´æÆÚÒ²²»±ØÊÂÏȸæËß±àÒëÆ÷£¬ÒòΪËüÊÇÔÚÔËÐÐʱ ¶¯Ì¬·ÖÅäÄÚ´æµÄ£¬JavaµÄÀ¬»øÊÕ¼¯Æ÷»á×Ô¶¯ÊÕ×ßÕâЩ²»ÔÙʹÓõÄÊý¾Ý¡£µ«È±µãÊÇ£¬ÓÉÓÚÒªÔÚÔËÐÐʱ¶¯Ì¬·ÖÅäÄڴ棬´æÈ¡ËٶȽÏÂý¡£
Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓڼĴæÆ÷£¬Õ»Êý¾Ý¿ÉÒÔ¹²Ïí¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐëÊÇÈ·¶¨µÄ£¬È±·¦Áé»îÐÔ¡£Õ»ÖÐÖ÷Òª´æ·ÅһЩ»ù±¾Àà Ð͵ıäÁ¿£¨,int, short, long, byte, float, double, boolean, char£©ºÍ¶ÔÏó¾ä±ú¡£
Õ»ÓÐÒ»¸öºÜÖØÒªµÄÌØÊâÐÔ£¬¾ÍÊÇ´æÔÚÕ»ÖеÄÊý¾Ý¿ÉÒÔ¹²Ïí¡£¼ÙÉèÎÒÃÇͬʱ¶¨Ò壺
int a = 3;
int b = 3£»
±àÒëÆ÷ÏÈ´¦Àíint a = 3£»Ê×ÏÈËü»áÔÚÕ»Öд´½¨Ò»¸ö±äÁ¿ÎªaµÄÒýÓã¬È»ºó²éÕÒÕ»ÖÐÊÇ·ñÓÐ3Õâ¸öÖµ£¬Èç¹ûûÕÒµ½£¬¾Í½«3´æ·Å½øÀ´£¬È»ºó½«aÖ¸Ïò3¡£½Ó×Å´¦Àíint b = 3£»ÔÚ´´½¨ÍêbµÄÒýÓñäÁ¿ºó£¬ÒòΪÔÚÕ»ÖÐÒѾ­ÓÐ3Õâ¸öÖµ£¬±ã½«bÖ±½ÓÖ¸Ïò3¡£ÕâÑù£¬¾Í³öÏÖÁËaÓëbͬʱ¾ùÖ¸Ïò3µÄÇé¿ö¡£
Õâʱ£¬Èç¹ûÔÙÁîa=4£»ÄÇô±àÒëÆ÷»áÖØÐÂËÑË÷Õ»ÖÐÊÇ·ñÓÐ4Öµ£¬Èç¹ûûÓУ¬Ôò½«4´æ·Å½øÀ´£¬²¢ÁîaÖ¸Ïò4£»Èç¹ûÒѾ­ÓÐÁË£¬ÔòÖ±½Ó½«aÖ¸ÏòÕâ¸öµØÖ·¡£Òò´ËaÖµµÄ¸Ä±ä²»»áÓ°Ïìµ½bµÄÖµ¡£
ҪעÒâÕâÖÖÊý¾ÝµÄ¹²ÏíÓëÁ½¸ö¶ÔÏóµÄÒýÓÃͬʱָÏòÒ»¸ö¶ÔÏóµÄÕâÖÖ¹²ÏíÊDz»Í¬µÄ£¬ÒòΪÕâÖÖÇé¿öaµÄÐ޸IJ¢²»»áÓ°Ïìµ½b, ËüÊÇÓɱàÒëÆ÷Íê³ÉµÄ£¬ËüÓÐÀûÓÚ½ÚÊ¡¿Õ¼ä¡£¶øÒ»¸ö¶ÔÏóÒýÓñäÁ¿ÐÞ¸ÄÁËÕâ¸ö¶ÔÏóµÄÄÚ²¿×´Ì¬£¬»áÓ°Ïìµ½ÁíÒ»¸ö¶ÔÏóÒýÓñäÁ¿¡£
StringÊÇÒ»¸öÌØÊâµÄ°ü×°ÀàÊý¾Ý¡£¿ÉÒÔÓãº
String str = new String("abc");
String str = "abc";
Á½ÖÖµÄÐÎʽÀ´´´½¨£¬µÚÒ»ÖÖÊÇÓÃnew()À´Ð½¨¶ÔÏóµÄ£¬Ëü»áÔÚ´æ·ÅÓÚ¶ÑÖС£Ã¿µ÷ÓÃÒ»´Î¾Í»á´´½¨Ò»¸öеĶÔÏó¡£
¶øµÚ¶þÖÖÊÇÏÈÔÚÕ»Öд´½¨Ò»¸ö¶ÔStringÀàµÄ¶ÔÏóÒýÓñäÁ¿str£¬È»ºó²éÕÒÕ»ÖÐÓÐûÓдæ·Å"abc"£¬Èç¹ûûÓУ¬Ôò½«"abc"´æ·Å½øÕ»£¬²¢ÁîstrÖ¸Ïò”abc”£¬Èç¹ûÒѾ­ÓДabc” ÔòÖ±½ÓÁîstrÖ¸Ïò“abc”¡£
±È½ÏÀàÀïÃæµÄÊýÖµÊÇ·ñÏàµÈʱ£¬ÓÃequals()·½·¨£»µ±²âÊÔÁ½¸ö°ü×°ÀàµÄÒýÓÃÊÇ·ñÖ¸Ïòͬһ¸ö¶ÔÏóʱ£¬ÓÃ==£¬ÏÂÃæÓÃÀý×Ó˵Ã÷ÉÏÃæµÄÀíÂÛ¡£
String str1 = "abc";
String str2 = "abc";
System.out.println(str1==str2); //true
¿ÉÒÔ¿´³östr1ºÍstr2ÊÇÖ¸Ïòͬһ¸ö¶ÔÏóµÄ¡£
String str1 =new Stri


Ïà¹ØÎĵµ£º

JavaÓëActionScriptµÄSocket(1)

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cn.vicky.socket;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Vector;
/**
*
* @author Vicky
* ¹ã²¥Àà
*/
public class BMana ......

JAVA²Ù×÷cookie

È¡:
Cookie[] cookies = request.getCookies();
 if(cookies!=null){
    for(Cookie cookie : cookies){
   if(cookie.getName().equals("mid")){
    String mid = cookie.getValue();
   }
  }
 }
´æ:
String mid ......

ÀàµÄ°ü·ÃÎÊȨÏÞ£º¡¶Java±à³Ì˼Ïë¡·ÖÐÒ»¶Î»°µÄÀ§»ó

ÀàµÄ°ü·ÃÎÊȨÏÞ£º¡¶Java±à³Ì˼Ïë¡·ÖÐÒ»¶Î»°µÄÀ§»ó
 
  ÔÚ¡¶java±à³Ì˼ÏëµÚÈý°æ¡·£¨³Âê»Åô ÈÄÈô骵ÈÒ룩µÄµÚÎåÕÂÒþ²Ø¾ßÌåʵÏÖÖУ¬5.4½ÚµÄ×îºóÒ»¶Î»°ÊÇ£º
  “ÕýÈçÇ°ÃæËùÌáµ½µÄ£¬Èç¹ûûÄÜΪÀà·ÃÎÊȨÏÞÖ¸¶¨Ò»¸ö·ÃÎÊÐÞÊηû£¬Ëü¾Í»áȱʡµÃµ½°ü·ÃÎÊȨÏÞ¡£ÕâÒâζןÃÀàµÄ¶ÔÏó¿ÉÒÔÓÉ°üÄÚÈκÎÆäËûÀàÀ´´´½¨£ ......

JAVA»­³öwavÒôƵ²¨ÐÎͼ


×ֺţº´ó ÖРС
import java.awt.Graphics;
import java.io.File;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
public class M ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ