ѧϰJava±Ø¿´ JAVA´úÂë±àдµÄ30Ìõ½¨Òé
ѧϰJava±Ø¿´ - JAVA´úÂë±àдµÄ30Ìõ½¨Òé
(1) ÀàÃûÊ××ÖĸӦ¸Ã´óд¡£×ֶΡ¢·½·¨ÒÔ¼°¶ÔÏ󣨾ä±ú£©µÄÊ××ÖĸӦСд¡£¶ÔÓÚËùÓбêʶ·û£¬ÆäÖаüº¬µÄËùÓе¥´Ê¶¼Ó¦½ô¿¿ÔÚÒ»Æ𣬶øÇÒ´óдÖм䵥´ÊµÄÊ××Öĸ¡£ÀýÈ磺
ThisIsAClassName
thisIsMethodOrFieldName
ÈôÔÚ¶¨ÒåÖгöÏÖÁ˳£Êý³õʼ»¯×Ö·û£¬Ôò´óдstatic final»ù±¾ÀàÐͱêʶ·ûÖеÄËùÓÐ×Öĸ¡£ÕâÑù±ã¿É±êÖ¾³öËüÃÇÊôÓÚ±àÒëÆڵij£Êý¡£
Java°ü£¨Package£©ÊôÓÚÒ»ÖÖÌØÊâÇé¿ö£ºËüÃÇÈ«¶¼ÊÇСд×Öĸ£¬¼´±ãÖмäµÄµ¥´ÊÒàÊÇÈç´Ë¡£¶ÔÓÚÓòÃûÀ©Õ¹Ãû³Æ£¬Èçcom£¬org£¬net»òÕßeduµÈ£¬È«²¿¶¼Ó¦Ð¡Ð´£¨ÕâÒ²ÊÇJava 1.1ºÍJava 1.2µÄÇø±ðÖ®Ò»£©¡£
(2) ΪÁ˳£¹æÓÃ;¶ø´´½¨Ò»¸öÀàʱ£¬Çë²ÉÈ¡"¾µäÐÎʽ"£¬²¢°üº¬¶ÔÏÂÊöÔªËصĶ¨Ò壺
equals()
hashCode()
toString()
clone()£¨implement Cloneable£©
implement Serializable
(3) ¶ÔÓÚ×Ô¼º´´½¨µÄÿһ¸öÀ࣬¶¼¿¼ÂÇÖÃÈëÒ»¸ömain()£¬ÆäÖаüº¬ÁËÓÃÓÚ²âÊÔÄǸöÀàµÄ´úÂ롣ΪʹÓÃÒ»¸öÏîÄ¿ÖеÄÀ࣬ÎÒÃÇû±ØҪɾ³ý²âÊÔ´úÂë¡£Èô½øÐÐÁËÈκÎÐÎʽµÄ¸Ä¶¯£¬¿É·½±ãµØ·µ»Ø²âÊÔ¡£ÕâЩ´úÂëÒ²¿É×÷ΪÈçºÎʹÓÃÀàµÄÒ»¸öʾÀýʹÓá£
(4) Ó¦½«·½·¨Éè¼Æ³É¼òÒªµÄ¡¢¹¦ÄÜÐÔµ¥Ôª£¬ÓÃËüÃèÊöºÍʵÏÖÒ»¸ö²»Á¬ÐøµÄÀà½Ó¿Ú²¿·Ö¡£ÀíÏëÇé¿öÏ£¬·½·¨Ó¦¼òÃ÷¶óÒª¡£Èô³¤¶ÈºÜ´ó£¬¿É¿¼ÂÇͨ¹ýijÖÖ·½Ê½½«Æä·Ö¸î³É½Ï¶ÌµÄ¼¸¸ö·½·¨¡£ÕâÑù×öÒ²±ãÓÚÀàÄÚ´úÂëµÄÖظ´Ê¹Óã¨ÓÐЩʱºò£¬·½·¨±ØÐë·Ç³£´ó£¬µ«ËüÃÇÈÔÓ¦Ö»×öͬÑùµÄÒ»¼þÊÂÇ飩¡£
(5) Éè¼ÆÒ»¸öÀàʱ£¬ÇëÉèÉí´¦µØΪ¿Í»§³ÌÐòÔ±¿¼ÂÇһϣ¨ÀàµÄʹÓ÷½·¨Ó¦¸ÃÊǷdz£Ã÷È·µÄ£©¡£È»ºó£¬ÔÙÉèÉí´¦µØΪ¹ÜÀí´úÂëµÄÈË¿¼ÂÇһϣ¨Ô¤¼ÆÓпÉÄܽøÐÐÄÄЩÐÎʽµÄÐ޸ģ¬ÏëÏëÓÃʲô·½·¨¿É°ÑËüÃDZäµÃ¸ü¼òµ¥£©¡£
(6) ʹÀྡ¿ÉÄܶÌС¾«º·£¬¶øÇÒÖ»½â¾öÒ»¸öÌض¨µÄÎÊÌâ¡£ÏÂÃæÊǶÔÀàÉè¼ÆµÄһЩ½¨Ò飺
¡öÒ»¸ö¸´ÔӵĿª¹ØÓï¾ä£º¿¼ÂDzÉÓÃ"¶àÐÎ"»úÖÆ
¡öÊýÁ¿ÖÚ¶àµÄ·½·¨Éæ¼°µ½ÀàÐͲî±ð¼«´óµÄ²Ù×÷£º¿¼ÂÇÓü¸¸öÀàÀ´·Ö±ðʵÏÖ
¡öÐí¶à³ÉÔ±±äÁ¿ÔÚÌØÕ÷ÉÏÓкܴóµÄ²î±ð£º¿¼ÂÇʹÓü¸¸öÀà
(7) ÈÃÒ»Çж«Î÷¶¼¾¡¿ÉÄܵØ"˽ÓÐ"--private¡£¿Éʹ¿âµÄijһ²¿·Ö"¹«¹²»¯"£¨Ò»¸ö·½·¨¡¢Àà»òÕßÒ»¸ö×ֶεȵȣ©£¬¾ÍÓÀÔ¶²»ÄÜ°ÑËüÄóö¡£ÈôÇ¿ÐÐÄóö£¬¾Í¿ÉÄÜÆÆ»µÆäËûÈËÏÖÓеĴúÂ룬ʹËûÃDz»µÃ²»ÖØбàдºÍÉè¼Æ¡£ÈôÖ»¹«²¼×Ô¼º±ØÐ빫²¼µÄ£¬¾Í¿É·ÅÐĴ󵨵ظı
Ïà¹ØÎĵµ£º
public class Migong {
private int gard[][]={ {1,1,1,1,0,1,1,1},
{0,0,0,1,1,1,1,1},
......
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.font.TextAttribute;
import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
import java.text.AttributedCharacterIterator;
import java.text. ......
ÔÚËùÓеÄJavaÊé¼®µ±ÖУ¬Æäʵ×î×îÓÐÓõģ¬²¢²»ÊÇO′reillyµÄ Java Serials£¬ÕæÕý×î×îÓÐÓô¦ÊÇJDKµÄÎĵµation£¡¼¸ºõÄãÏë»ñµÃµÄËùÓеÄ֪ʶÔÚÎĵµationÀïÃæÈ«²¿¶¼ÓУ¬ÆäÖÐ×îÖ÷ÒªµÄ²¿·Öµ±È»ÊÇJava»ù´¡Àà¿âµÄAPIÎĵµ£¬ÊÇ°´ÕÕpackageÀ´×éÖ¯µÄ£¬¶ÔÓÚÿһ¸öclass¶¼ÓÐÏêϸµÄ½âÊÍ£¬ËüµÄ¼Ì³Ð¹Øϵ£¬ÊÇ·ñʵÏÖÁËij¸ö½Ó¿Ú£¬Í¨³£ÓÃÔÚÄÄÐ ......
package com.softeem.jbs.lesson4;
import java.util.Random;
/**
* ÅÅÐò²âÊÔÀà
*
* ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º
* 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£»
* 2.½»»»ÅÅÐò£¨Ã°ÅÝÅÝÅÅÐò¡¢¿ìËÙÅÅÐò£©£»
* 3.Ñ¡ÔñÅÅÐò£¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò£©£»
* 4.¹é²¢ÅÅÐò£»
* 5.»ùÊýÅÅÐò¡£
*
* ¹ØÓÚÅÅÐ ......
1. ÓÃScriptEngineManagerÀà¡£ÕâÊÇ»ùÓÚJSR-223¹æ·¶µÄjava½Å±¾API( scripting API)¡£¿ÉÒÔÔÚjava³ÌÐòÖÐÔËÐÐһЩ½Å±¾£¬Èç JavaFX script, javascriptµÈ¡£
¡¡¡¡2. ͨ¹ýJavaFX reflection API¡£ÕâÊÇJavaFXÌṩµÄ·´ÉäAPI£¬¼¸ºõ¿ÉÒÔµ÷ÓÃËùÓеÄJavaFXÀà¡£
¡¡¡¡3. ÏÈÓÃJavaFXÀàʵÏÖÒ»¸öJavaµÄinterface£¬È»ºóJava³ÌÐò¿ÉÒÔͨ¹ýÕ⸠......