Javaѧϰ±Ê¼Ç£¨1£© ¶ÔÏó³õʼ»¯Ë³Ðò
ÔÚJavaÖУ¬µ±Ò»¸ö¶ÔÏó±»´´½¨Ê±£¬³ÉÔ±±äÁ¿µÄ³õʼ»¯¼°¹¹Ôì·½·¨µÄµ÷ÓÃ×ñÑÒÔÏÂ˳Ðò£º
1. ½«·ÖÅä¸ø¶ÔÏóµÄ´æ´¢¿Õ¼ä³õʼ»¯³É¶þ½øÖƵÄÁã¡£
2. µ÷ÓÃËùÓлùÀàµÄ¹¹Ôì·½·¨¡£Õâ¸ö²½Öè»á²»¶ÏµØ·´¸´µÝ¹éÏÂÈ¥£¬Ê×ÏÈÊǹ¹ÔìÕâÖÖ²ã´Î½á¹¹µÄ¸ù£¬È»ºóÊÇÏÂÒ»²ã×ÓÀ࣬µÈµÈ£¬Ö±µ½×îµ×²ãµÄ×ÓÀà¡£
3. °´ÕÕÉùÃ÷µÄ˳Ðòµ÷ÓóÉÔ±µÄ³õʼ»¯·½·¨¡£
4. µ÷ÓÃ×ÓÀàµÄ¹¹Ôì·½·¨Ö÷Ìå¡£
ÏÂÃæ¾ÙÀý˵Ã÷¡£
class Glyph {
Glyph(){
System.out.println("Glyph() before draw()");
draw();
System.out.println("Glyph() after draw()");
}
void draw(){
System.out.println("Glyph.draw()");
}
}
class RoundGlyph extends Glyph {
private int radius = 1;
RoundGlyph(int r){
radius = r;
System.out.println("RoundGlyph.RoundGlyph(), radius = " + radius);
}
void draw(){
System.out.println("RoundGlyph.draw(), radius = " + radius);
}
public static void main(String[] args) {
new RoundGlyph(5);
}
}
ÔËÐнá¹û£º
Glyph() before draw()
RoundGlyph.draw(), radius = 0
Glyph() after draw()
RoundGlyph.RoundGlyph(), radius = 5
¿ÉÒÔ¿´³ö£¬ÔÚÊä³ö½á¹ûµÄµÚ¶þÐÐÖУ¬ÓÉÓÚ²½Öè1µÄÔµ¹Ê£¬radiusµÄֵΪ0.
Ïà¹ØÎĵµ£º
xmlÖмüÃûΪ Ó¢ÎÄ£¬¼üֵΪÖÐÎÄ£¬¶ÁÈ¡½âÎö£¬È¡ÖµÊµÏÖ·Òë
import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList; ......
1.ʵÀý³ÉÔ±ºÍÀà³ÉÔ±
ʵÀý³ÉÔ±ÖÐÊÇÊôÓÚ¶ÔÏóµÄ,°üÀ¨ÊµÀý³ÉÔ±±äÁ¿ºÍʵÀý³ÉÔ±·½·¨,Ö»Óд´½¨Á˶ÔÏóÖ®ºó²ÅÄÜ·ÃÎÊʵÀý³ÉÔ±±äÁ¿ºÍʵÀý³ÉÔ±·½·¨.
Àà³ÉÔ±ÊÇÊôÓÚÀàµÄ,Àà³ÉÔ±ÐèÒªÓùؼü×Östatic±êʶ,Ò²³ÆΪ¾²Ì¬³ÉÔ±,Àà³ÉÔ±°üÀ¨Àà³ÉÔ±±äÁ¿ºÍÀà³ÉÔ±·½·¨,ͨ¹ýÀàÃû¿ÉÒÔÖ±½Ó·ÃÎÊÀà³ÉÔ±±äÁ¿ºÍµ÷ÓÃÀà³ÉÔ±·½·¨,¼´Ê¹Ã»Óд´½ ......
ͨ¹ý DAOFactory µÄ·ºÐÍд·¨À´ÑÝʾJava·ºÐ͵ÄÌØÊâÓ÷¨
СÐÍÏîÄ¿Öг£³£¶¼Ã»ÓÐÓÃÈý·½³Ö¾Ã»¯¿ò¼Ü£¬¶ø´ó¶¼ÊÇÓù«Ë¾»ò×ÔÐÐÒÀ¾ÝDAOģʽ·â×°µÄһЩ×é¼þÀ´Íê³ÉÊý¾Ý¿â³Ö¾Ã»¯¶¯×÷£¬²¢ÇÒ£¬Í¨³£ÎªÁ˸ü¾ß¿ÉÀ©Õ¹ÐÔ£¬³£³£Ê¹ÓóéÏ󹤳§Ä£Ê½À´½âñîºÏ¡£
Ò»¡¢ÏÈ¿´´úÂë
1¡¢¼òµ¥¹¤³§´úÂë
/************************************************* ......
1.JavaѧϰÍøÕ¾:
JavaÖÐÎÄÊÀ½çÂÛ̳ http://www.chinajavaworld.com/index.jspa
JavaÊÀ¼ÍÍø http://www.java2000.net/
Java ÖÐÎÄÕ¾ http://www.java-cn.com/
JavaѧϰÊÒ ......
×î½üÔÚʹÓÃPowerDesignerÉè¼ÆÊý¾Ý¿â,Éè¼ÆÍêcdm ºÍ pdmʱ,Á˽⵽¿ÉÒÔÓÃoom×Ô¶¯Éú³ÉJavaÀà.
µ«ÊÇÉú³ÉµÄJavaÀàµÄĬÈϸñʽºÍ×Ô¼ºµÄÒªÇóÓÐÆ«²î,×îÖյõ½ÁËЩ½â¾ö°ì·¨.ÕâÀï¼Ç¼ÁËÏÂ.(ÎÒʹÓõİ汾ÊÇPowerDesigner12)
ÔÚoomÄ£ÐÍÖÐlanguage>edit current object language. ÀàµÄÖ÷¸ñʽÊÇ ......