JavaµÄ¹¤³§Ä£Ê½Àý×Ó
1. ¼òµ¥¹¤³§:
(1). ´´½¨Êä³ö(Output)½Ó¿Ú
package stone;
public interface Output {
public int MAX_COUNT =10; // ×î¶à¿É´òÓ¡¶àÉÙÌõ¼Ç¼
public void show(); // ´òÓ¡
public void addData(String msg); // °ÑÒª´òÓ¡µÄ¼Ç¼¼ÓÈëµ½´òÓ¡ÅÅÐò
}
(2). ´´½¨´òÓ¡»úÀà, Æä¼Ì³ÐÊä³ö½Ó¿Ú
package stone;
public class Printer implements Output {
private String[] data_array= new String[MAX_COUNT]; // ±£´æÒª´òÓ¡ÐÅÏ¢µÄÊý×é
private int dataNum=0; // Òª´òÓ¡ÐÅÏ¢µÄ¸öÊý
public void addData(String msg) {
if(dataNum>MAX_COUNT) // Òª´òÓ¡µÄÐÅÏ¢²»ÄÜ´óÊ¿×î´óÖµ
System.out.println("Print queue is max");
else
data_array[dataNum++]=msg;
}
public void show() {
while(dataNum>0){
 
Ïà¹ØÎĵµ£º
http://developer.51cto.com/art/200906/130976.htm
JSF 2.0
¾¡¹Ü Java ÔÚչʾ²ã¿ò¼ÜÉϾºÕùµÄ·Ç³£¼¤ÁÒ£¬µ« JSF ÈÔÈ»¹ÌÊØ×Å×Ô¼ºµÄÁìµØ¡£ËäÈ»Óкܶà¹ØÓÚ JSF µÄÒ×ÓÃÐԺͽ¡×³ÐÔµÄÖÊÒÉÉù£¬µ« JSF2.0 ¾ÍÊÇΪÕýÃæ½â¾öÕâЩÎÊÌâ¶øÌá³öÀ´µÄ£¬ËüµÄÒ×Ó㬴´ÐÂÒÔ¼°¿ÉÀ©Õ¹µÄÌØÐÔ°üÀ¨£º
JSF Õýʽ½« Facelets ×÷ΪÊÓͼ¼¼Êõ¡£Ò²ÐíÄã²»ÊìÏ ......
1.2.1 javaÐéÄâ»ú(1)
¡¡javaÐéÄâ»úÊÇÈí¼þÄ£ÄâµÄ¼ÆËã»ú£¬¿ÉÒÔÔÚÈκδ¦ÀíÆ÷ÉÏ£¨ÎÞÂÛÊÇÔÚ¼ÆËã»úÖл¹ÊÇÔÚÆäËüµç×ÓÉ豸ÖУ©°²È«²¢ÇÒ¼æÈݵÄÖ´Ðб£´æÔÚ.classÎļþÖеÄ×Ö½ÚÂë¡£javaÐéÄâ»úµÄ"»úÆ÷Âë"±£´æÔÚ.classÎļþÖУ¬ÓÐʱҲ¿ÉÒÔ³Æ֮Ϊ×Ö½ÚÂëÎļþ¡£java³ÌÐòµÄ¿çƽ̨Ö÷ÒªÊÇÖ¸×Ö½ÚÂëÎļþ¿ÉÒÔÔÚÈκξßÓÐjavaÐéÄâ»úµÄ¼ÆËã»ú»òÕßµç×ÓÉ ......
javaÐéÄâ»ú
¡¡¡¡µ«ÊÇ£¬javaÐéÄâ»úµÄ½¨Á¢ÐèÒªÕë¶Ô²»Í¬µÄÈíÓ²¼þƽ̨×öרÃŵÄʵÏÖ£¬¼ÈÒª¿¼ÂÇ´¦ÀíÆ÷µÄÐͺţ¬Ò²Òª¿¼ÂDzÙ×÷ϵͳµÄÖÖÀà¡£ÈçÏÂͼËùʾ£¬Ä¿Ç°ÔÚSPARC½á¹¹¡¢X86½á¹¹¡¢MIPSºÍPPCµÈǶÈëʽ´¦ÀíоƬÉÏ¡¢ÔÚUNIX¡¢Linux¡¢windowsºÍ²¿·Öʵʱ²Ù×÷ϵͳÉ϶¼ÓÐjavaÐéÄâ»úµÄʵÏÖ¡£ ......
½üÆÚµÄÒ»¸öÏîÄ¿ÐèҪʵÏÖÉãÏñͷͼÏñ²É¼¯£¬¾¹ýһϵÁеÄÕÛÌÚÒÔºó£¬ÖÕÓÚʵÏÖÁËÕâ¸ö¹¦ÄÜ£¬ÏÖÕûÀíһϡ£
±¾Éí¾Íjava¼¼ÊõÀ´Ëµ£¬ÒªÊµÏÖÉãÏñÍ·¶þ´Î¿ª·¢£¬²É¼¯ÉãÏñͷͼƬ£¬ÐèҪʹÓõ½JMF£¬JMFÊʺÏʹÓÃÔÚj2se³ÌÐòµ±ÖУ¬ÎÒÐèÒªÔÚweb³ÌÐòÖе÷ÓÃÉãÏñÍ·£¬ºÜÃ÷ÏÔJMFÊǸ㲻¶¨ÁË£¬Ïë¹ýдһ¸öapplet³ÌÐò£¬Ö»ÊÇÄǶ«Î÷ÒªÇó¿Í»§¶Ë±ØÐëÒªÓÐjre»·¾ ......
Java»ù´¡·½Ãæ:
1¡¢×÷ÓÃÓòpublic,private,protected,ÒÔ¼°²»Ð´Ê±µÄÇø±ð
´ð£ºÇø±ðÈçÏ£º
×÷ÓÃÓò µ±Ç°Àà ͬһpackage ×ÓËïÀà ÆäËûpackage
public& ......