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

Java»ù´¡ÖªÊ¶


 
´ÓCore Javaµ½Thinking in Java
JavaÊÇÒ»ÖÖ¿çƽ̨¡¢ÃæÏò¶ÔÏ󡢸øÓèÍøÂç¼°Ö§³Ö¶àýÌåµÄ±à³ÌÓïÑÔ£¬²¢¿É²åÈëµ½HTMLÎĵµÖС£
1.ÔÚhtmlÎĵµÖÐÌí¼ÓÁ´½Ó£¬¼´ÔÚ<body>±êÇ©¼ä²åÈëÒÔÏ´úÂ룺
<applet code=ÀàÃû.class width=¿í¶È height=¸ß¶È></applet>
2.·â×°ÊÇÒ»ÖÖ½«´úÂë¼°Æä´¦ÀíµÄÊý¾Ý°ó¶¨ÔÚÒ»Æð±à³Ì»úÖÆ£»
3. ¾­Javac°Ñÿ¸öÀ඼±àÒë³É¶ÀÁ¢µÄÎļþ£¬Îª ÀàÃû.class ,Ëü°üÀ¨¿ÉÒÆÖ²µÄÖмäÓïÑÔj-´úÂë¡£
×ø±êʱ°´ÏñËصã×óÉϽǣ¨0£¬0£©´¦¿ªÊ¼¼ÆË㣬ÒÔÈ·¶¨ºÎʱ»­Í¼¡£
4.¶ÔÏóÊÇÀàµÄʵÀý£¬ÊǾßÓнṹºÍ״̬µÄʵÌ壬ÊDz»±»·Ö¸îµÄÔ­×Óµ¥Î»
5£®instanceof()²Ù×÷·ûÑéÖ¤´æ´¢¶ÔÏóÀàÐÍ£¬
µãºÅÔËËã·ûÓÃÓÚÑ¡ÔñÒ»¸ö¶ÔÏó»ò·½·¨
newÔËËã·ûÓÃÓÚ´´½¨¶ÔÏó
À¬»ø»ØÊÕ×Ô¶¯ÊͷŲ»ÔÙ±»µ÷ÓõÄÄÚ´æ¿Õ¼ä
°´Öµµ÷Óã¬Êµ²Î´«µÝ¸øÐβÎ
+ÔËËã·ûÓëconcat()·½·¨Æ´½Ó×Ö·û´®£¬str1+”ha!”;str1.concat(str2);
1. ±à³Ìģʽ£º
×¢ÊÍ£º
/* This is a two line comment */
// This is a line comment
/** Java documentation comment */
Ó¦ÓóÌÐòģʽ£¬ÈçÏ£º
import corejava.*;                   //ÒýÓÃcorejava°üÖб¾³ÌÐòÓõ½µÄÀà
public class Óû§¶¨ÒåµÄÀàÃû{         //¶¨ÒåÀà
public static void main(String[] args) //void±íʾ·½·¨Íê³Éºó²»·µ»ØÐÅÏ¢
{
        ---                         //·½·¨Ìå
}
}
È磺
public static void main(String[] args){
int n=Console.readInt(“Enter the value of n:”);
for(long i=0;i<=n;i++){
Format.printf(“%d”,i);
Format.printf(“!=%d\n”,factorial(i));
}
}
public static long factorial(long n){
if(n<=1) return 1;
else return n*factorial(n-1);
}
}
Applet СӦÓóÌÐò±à³Ìģʽ£¬ÈçÏ£º
import java.awt.Graphics;     //ÒýÈëjava.awt°üÖеÄGraphicsÀà
import java.applet.Applet;
public class Óû§¶¨ÒåµÄÀàÃû extends Applet   //ÓÃextends¶¨Òå¼Ì³ÐÀà
{
public void paint(Gr


Ïà¹ØÎĵµ£º

¾ÞÈËÍøÂçjava±ÊÊÔ»ù´¡Ìâ·ÖÏí

1¡¢StringÊÇ×î»ù±¾µÄÊý¾ÝÀàÐÍÂð?
»ù±¾Êý¾ÝÀàÐÍ°üÀ¨byte¡¢int¡¢char¡¢long¡¢float¡¢double¡¢booleanºÍshort¡£
java.lang.StringÀàÊÇfinalÀàÐ͵ģ¬Òò´Ë²»¿ÉÒԼ̳ÐÕâ¸öÀà¡¢²»ÄÜÐÞ¸ÄÕâ¸öÀࡣΪÁËÌá¸ßЧÂʽÚÊ¡¿Õ¼ä£¬ÎÒÃÇÓ¦¸ÃÓÃStringBufferÀà
2¡¢int ºÍ Integer ÓÐʲôÇø±ð
Java ÌṩÁ½ÖÖ²»Í¬µÄÀàÐÍ£ºÒýÓÃÀàÐͺÍԭʼÀàÐÍ£¨ ......

java·´ÉäµÄÀý×Ó


package cn.test;


import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;


/**
* Java Reflection Cookbook
*
* @author Michael Lee
* @since 2006-8-23
* ......

javaÓ¢Îĵ¥´Ê

platform ['plætfɔ:m] n.ƽ̨
standard edition±ê×¼°æ
enterprise ['entəpraiz] n. ÆóÒµ
bytecode n.×Ö½ÚÂ룬×Ö½Ú´úÂë
verifier n. ¼ìÑé»ú
modifier  [‘mɔdifaiə] n.ÐÞÊÎÓï
attribute  [‘ætribju:t] vt.(to)°Ñ…¹éÒòÓÚn.ÊôÐÔ£¬ÌØÐÔ
declaration  ......

c++ÖÐÄÜ·ñʹÓÃinterface£¨Èçjava£©ÄÇÑùµÄ¹¦ÄÜ?

ÎÊ:
      È·ÈÏÒ»ÏÂc++Öв»ÄÜʹÓÃinterface£¨Èçjava£©ÄÇÑùµÄ¹¦ÄÜ°Ñ
ÎÒÈÏΪÊDz»Äܵģ¬×¢ÒâÎÒ˵µÄÊÇinterface£¨ÓÃÓÚjava¶àÖؼ̳еÄÄǸö£¬²»ÊÇÒ»°ãÒâÒåµÄ½Ó¿Ú£©
ÎÒ¾õµÃÊÇûÓеģ¬µ«ÊÇÍøÉÏËÑË÷˵ʲôµÄ¶¼ÓжøÇÒÈË»¹²»ÉÙ…… ËùÒÔÏ£Íû´ó¼ÒÄܸøÎÒÒ»¸öÃ÷È·µÄ´ð¸´ºÃô£¿×îºÃÄÜ»¹ÓÐһР......

javaÊý×é

Êý×éÊôÒýÓÃÀàÐÍ£¬Êý×éÐÍÊý¾ÝÊǶÔÏó(object)£¬Êý×éÖеÄÿ¸öÔªËØÏ൱ÓڸöÔÏóµÄ³ÉÔ±±äÁ¿
Êý×éÖеÄÔªËØ¿ÉÒÔÊÇÈκÎÊý¾ÝÀàÐÍ£¬°üÀ¨»ù±¾ÀàÐͺÍÒýÓÃÀàÐÍ
¼ÇסÊý×éÊ×ÏÈ·ÖÅä¿Õ¼äÔÙ¸³Öµ£¡
¶¯Ì¬³õʼ»¯£º¾ÍÊÇÏÈ·ÖÅä¿Õ¼äÔÙ¸³³õÖµ£»
¾²Ì¬³õʼ»¯£º¶¨ÒåÊý×éͬʱ¾ÍΪÊý×éÔªËØ·ÖÅä¿Õ¼ä²¢¸³Öµ¡£
1һάÊý×éµÄÉùÃ÷
һάÊý×éµÄÉùÃ÷£ºtype va ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ