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

String in Java

 ÖÚËùÖÜÖª£¬StringÊÇÓÉ×Ö·û×é³ÉµÄ´®£¬ÔÚ³ÌÐòÖÐʹÓÃƵÂʺܸߡ£JavaÖеÄStringÊÇÒ»¸öÀ࣬¶ø²¢·Ç»ù±¾Êý¾ÝÀàÐÍ¡£ ²»¹ýËýÈ´²»ÊÇÆÕͨµÄÀàŶ£¡£¡£¡
¡¾¾µÍ·1¡¿ String¶ÔÏóµÄ´´½¨
   1¡¢¹ØÓÚÀà¶ÔÏóµÄ´´½¨£¬ºÜÆÕͨµÄÒ»ÖÖ·½Ê½¾ÍÊÇÀûÓù¹ÔìÆ÷£¬StringÀàÒ²²»ÀýÍ⣺
           String s=new String("Hello world");
   ÎÊÌ⣺²ÎÊý"Hello world"ÊÇʲô¶«Î÷£¬Ò²ÊÇ×Ö·û´®¶ÔÏóÂð?Ī·ÇÓÃ×Ö·û´®¶ÔÏó´´½¨Ò»¸ö×Ö·û´®¶ÔÏó???
   2¡¢µ±È»£¬StringÀà¶ÔÏó»¹ÓÐÒ»ÖÖ´ó¼Ò¶¼ºÜϲ»¶µÄ´´½¨·½Ê½£º
           String s="Hello world";
   ÎÊÌ⣺Óеã¹Öѽ£¬ÔõôÓë»ù±¾Êý¾ÝÀàÐ͵ĸ³Öµ²Ù×÷£¨int i=1£©ºÜÏñѽ???
ÔÚ¿ªÊ¼½âÊÍÕâЩÎÊÌâ֮ǰ£¬ÎÒÃÇÏÈÒýÈëһЩ±ØÒªµÄ֪ʶ:
(1) Java classÎļþ½á¹¹
       ÎÒÃǶ¼ÖªµÀ£¬Java³ÌÐòÒªÔËÐУ¬Ê×ÏÈÐèÒª±àÒëÆ÷½«Ô´´úÂëÎļþ±àÒë³É×Ö½ÚÂëÎļþ(Ò²¾ÍÊÇ.classÎļþ)¡£È»ºóÔÚÓÉJVM½âÊÍÖ´ÐС£
       classÎļþÊÇ8λ×ֽڵĶþ½øÖÆÁ÷
¡£ÕâЩ¶þ½øÖÆÁ÷µÄº­ÒåÓÉһЩ½ô´ÕµÄÓÐÒâÒåµÄÏî
×é³É¡£±ÈÈçclass×Ö½ÚÁ÷ÖÐ×ʼµÄ4¸ö×Ö½Ú×é³ÉµÄÏî½Ð×öħÊý
(magic)£¬ÆäÒâÒåÔÚÓÚ·Ö±æclassÎļþ(ֵΪ0xCAFEBABE)Óë·ÇclassÎļþ¡£class×Ö½ÚÁ÷´óÖ½ṹÈçÏÂͼ×ó²à¡£
                               
      ÆäÖУ¬ÔÚclassÎļþÖÐÓÐÒ»¸ö·Ç³£ÖØÒªµÄÏî——³£Á¿³Ø
¡£Õâ¸ö³£Á¿³ØרÃÅ·ÅÖÃÔ´´úÂëÖеij£Á¿ÐÅÏ¢(²¢ÇÒ²»Í¬µÄ³£Á¿´æ·ÅÔÚ²»Í¬±êÖ¾µÄ³£Á¿±íÖÐ)¡£ÈçÉÏͼÓÒ²àÊÇHelloWorld´úÂëÖеij£Á¿±í
£¨HelloWorld´úÂëÈçÏ£©£¬ÆäÖÐÓÐËĸö²»Í¬ÀàÐ͵ij£Á¿±í£¨Ëĸö²»Í¬µÄ³£Á¿³ØÈë¿Ú£©¡£¹ØÓÚ³£Á¿³ØµÄ¾ßÌåϸ½Ú£¬Çë²ÎÕÕ¡¶ÉîÈëJavaÐéÄâ»ú¡·µÚ¶þ°æµÚ
6Õ¡£
Java´úÂë
public
 
class
 HelloWorld{  
    void
 hello(){  
        System.out.println("Hello world"
);  
    }  
}  
publi


Ïà¹ØÎĵµ£º

javaºÍphpÊý×Ö´¦ÀíÉÏ

javaʹÓÃMathÀ࣬phpʹÓÃϵͳº¯Êý
ceil¹¦ÄÜ ´óÓÚµÈÓÚijÊý(³£ÓÃÓÚ·ÖÒ³Ò³Êý¼ÆË㣩
phpÖУºceil(a/b)
javaÖУº(int)Math.ceil((double)a/b))    Math.ceilÔÚjavaÖÐÐèÒª´«ÈëdoubleÐÍ£¬¶ø·µ»ØÒ²ÊÇdoubleÐÍ¡£×¢ÒâÕâÀïÓÃ(double)a/b²Å¿ÉÒÔ¡£
a/b,(dobule)(a/b)¶¼²»ÐС£ÒòΪËûÃÇ»áÏÈ×Ô¶¯ÉáÆúСÊýÈ¡µÃÕûÊý
flooe ......

javaÖÐyield(),sleep()ÒÔ¼°wait()µÄÇø±ð

 ÍùÍù»ìÏýÁËÕâÈý¸öº¯ÊýµÄʹÓá£
´Ó²Ù×÷ϵͳµÄ½Ç¶È½²£¬os»áά»¤Ò»¸öready queue£¨¾ÍÐ÷µÄÏ̶߳ÓÁУ©¡£²¢ÇÒÔÚijһʱ¿ÌcpuֻΪready queueÖÐλÓÚ¶ÓÁÐÍ·²¿µÄÏ̷߳þÎñ¡£
µ«Êǵ±Ç°ÕýÔÚ±»·þÎñµÄÏ߳̿ÉÄܾõµÃcpuµÄ·þÎñÖÊÁ¿²»¹»ºÃ£¬ÓÚÊÇÌáÇ°Í˳ö£¬Õâ¾ÍÊÇyield¡£
»òÕßµ±Ç°ÕýÔÚ±»·þÎñµÄÏß³ÌÐèҪ˯һ»á£¬ÐÑÀ´ºó¼ÌÐø±»·þÎñ£¬Õâ¾ÍÊ ......

JAVA»ù´¡ÃæÊÔÌâ3

 69¡¢¼òÊöÂß¼­²Ù×÷(&,|,^)ÓëÌõ¼þ²Ù×÷(&&,||)µÄÇø±ð¡£
Çø±ðÖ÷Òª´ðÁ½µã£ºa.Ìõ¼þ²Ù×÷Ö»ÄܲÙ×÷²¼¶ûÐ͵Ä,¶øÂß¼­²Ù×÷²»½ö¿ÉÒÔ²Ù×÷²¼¶ûÐÍ,¶øÇÒ¿ÉÒÔ²Ù×÷ÊýÖµÐÍ
b.Âß¼­²Ù×÷²»»á²úÉú¶Ì·
70¡¢XMLÎĵµ¶¨ÒåÓм¸ÖÖÐÎʽ£¿ËüÃÇÖ®¼äÓкα¾ÖÊÇø±ð£¿½âÎöXMLÎĵµÓÐÄļ¸ÖÖ·½Ê½£¿
a: Á½ÖÖÐÎʽ dtd  schema£¬b: ±¾ÖÊÇø ......

JavaÓÅ»¯±à³Ì

1.       ÔÚCÓïÑÔÖУ¬ÎÒÃÇͨ³£Ï°¹ß°ÑÐèÒªµÄ¶ÔÏóÉêÃ÷·ÅÔÚº¯ÊýµÄ¿ªÍ·£¬µ«ÆäʵÕâÊÇ°×°×ÀË·ÑÁËÄڴ棬ÔÚJavaÖУ¬²»µ½ÐèÒªµÄʱºò£¬Çë²»Òª´´½¨¶ÔÏó¡£
2.       À¬»ø»ØÊջ᲻¶¨ÆÚµÄËÑË÷ÒѾ­Ã»ÓÐÓõĶÔÏó£¬È»ºóÊͷŶÔÏóµÄÄڴ棬µ«ÕâÖÖËÑË÷ÊDZȽϺÄ×ÊÔ´µÄ¡£ÎªÌá¸ßЧÂÊ£ ......

javaÃæÊÔÌâ3

23.±à³ÌʵÏÖÐòÁл¯µÄStudent£¨sno,sname£©¶ÔÏóÔÚÍøÂçÉϵĴ«Êä
package com.softeem.demo;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.ServerSocket;
import java.net.Socket;
class Student implem ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ