Java¹Ø¼ü×Öfinal¡¢staticʹÓÃ×ܽ᡾ת¡¿
Ò»¡¢final
¸ù¾Ý³ÌÐòÉÏÏÂÎÄ»·¾³£¬Java¹Ø¼ü×ÖfinalÓГÕâÊÇÎÞ·¨¸Ä±äµÄ”»òÕß“ÖÕ̬µÄ”º¬Ò壬Ëü¿ÉÒÔÐÞÊηdzéÏóÀà¡¢·Ç³éÏóÀà³ÉÔ±·½·¨ºÍ±äÁ¿¡£Äã¿ÉÄܳöÓÚÁ½ÖÖÀí½â¶øÐèÒª×èÖ¹¸Ä±ä£ºÉè¼Æ»òЧÂÊ¡£
finalÀ಻Äܱ»¼Ì³Ð£¬Ã»ÓÐ×ÓÀ࣬finalÀàÖеķ½·¨Ä¬ÈÏÊÇfinalµÄ¡£
final·½·¨²»Äܱ»×ÓÀàµÄ·½·¨¸²¸Ç£¬µ«¿ÉÒÔ±»¼Ì³Ð¡£
final³ÉÔ±±äÁ¿±íʾ³£Á¿£¬Ö»Äܱ»¸³ÖµÒ»´Î£¬¸³ÖµºóÖµ²»Ôٸı䡣
final²»ÄÜÓÃÓÚÐÞÊι¹Ôì·½·¨¡£
×¢Ò⣺¸¸ÀàµÄprivate³ÉÔ±·½·¨ÊDz»Äܱ»×ÓÀà·½·¨¸²¸ÇµÄ£¬Òò´ËprivateÀàÐ͵ķ½·¨Ä¬ÈÏÊÇfinalÀàÐ͵ġ£
1¡¢finalÀà
finalÀ಻Äܱ»¼Ì³Ð£¬Òò´ËfinalÀàµÄ³ÉÔ±·½·¨Ã»Óлú»á±»¸²¸Ç£¬Ä¬È϶¼ÊÇfinalµÄ¡£ÔÚÉè¼ÆÀàʱºò£¬Èç¹ûÕâ¸öÀ಻ÐèÒªÓÐ×ÓÀ࣬ÀàµÄʵÏÖϸ½Ú²»ÔÊÐí¸Ä±ä£¬²¢ÇÒÈ·ÐÅÕâ¸öÀ಻»áÔر»À©Õ¹£¬ÄÇô¾ÍÉè¼ÆΪfinalÀà¡£
2¡¢final·½·¨
Èç¹ûÒ»¸öÀ಻ÔÊÐíÆä×ÓÀา¸Çij¸ö·½·¨£¬Ôò¿ÉÒÔ°ÑÕâ¸ö·½·¨ÉùÃ÷Ϊfinal·½·¨¡£
ʹÓÃfinal·½·¨µÄÔÒòÓжþ£º
µÚÒ»¡¢°Ñ·½·¨Ëø¶¨£¬·ÀÖ¹Èκμ̳ÐÀàÐÞ¸ÄËüµÄÒâÒåºÍʵÏÖ¡£
µÚ¶þ¡¢¸ßЧ¡£±àÒëÆ÷ÔÚÓöµ½µ÷ÓÃfinal·½·¨Ê±ºò»áתÈëÄÚǶ»úÖÆ£¬´ó´óÌá¸ßÖ´ÐÐЧÂÊ¡£
ÌÆɽIT¼¼Êõhttp://www.tsp2c.cn/
Ïà¹ØÎĵµ£º
¹¤ÓûÉÆÆäÊ£¬±ØÏÈÀûÆäÆ÷¡£ÊìϤ¿ª·¢»·¾³¿ÉÒÔÈÃÄã¸ü¿ì¸üºÃ¸üÊæ·þµØ¿ª·¢Èí¼þ¡£¾ÍÈçͬVC/.net¿ª·¢ÈËÔ±Àë²»¿ªmsdn£¬java¿ª·¢ÈËÔ±ÍùÍùÒ²Àë²»¿ªjava API¡£ÏÂÃæ½éÉÜÏÂÈçºÎÔÚEclipseºÍNetBeansÖе¼Èëjava API¡£Ê¹Ö®¿ÉÒÔ·½±ã¿ìËٵزéÕÒ£¬¶¨Î»¡£
¡¡¡¡±¾ÎÄÊʺÏÓë¸Õ¸Õ½Ó´¥Eclipse»òNetBeansµÄjava¿ª·¢ÈËÔ±£¬»òÕßÊÇÓоÑéµÄʹÓÃEc ......
¡¡¡¡Ëµµ½GB2312ºÍGBK¾Í²»µÃ²»ÌáÖÐÎÄÍøÒ³µÄ±àÂë¡£¾¡¹ÜºÜ¶àпª·¢µÄWebϵͳºÍÐÂÉÏÏßµÄ×¢Öعú¼Ê»¯µÄÍøÕ¾¶¼¿ªÊ¼Ê¹ÓÃUTF-8£¬ÈÔÓÐÏ൱һ²¿·ÖµÄÖÐÎÄýÌå¼á³ÖʹÓÃGB2312ºÍGBK£¬ÀýÈçÐÂÀ˵ÄÒ³Ãæ¡£ÆäÖÐÓÐÁ½µãºÜÖµµÃ×¢Òâ¡£
¡¡¡¡µÚÒ»£¬Ò³ÃæÖÐmeta±êÇ©µÄ²¿·Ö£¬³£³£¿ÉÒÔ¼ûµ½charset=GB2312ÕâÑùµÄд·¨£¬ºÜ²»ÐÒµÄÊÇ£¬Õâ¸ö“cha ......
ѧϰJava³ÌÐòÖ÷Òª°üº¬ÒÔÏÂËĸö²¿·Ö¡£
(1)±à¼´úÂë edit code
(2)±£´æ´úÂë save code
(3)±àÒë´úÂë compiler code
(4)ÔËÐгÌÐò run program
µÚÒ»¸ö³ÌÐòÎļþHelloWorld.java
public class HelloWorld {
public static void main(String[] args){
......
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.*;
public class ReadXML {
private File file;
public ReadXML(String filename){
File file=new File(filename);
this.file=file;
}
/**
......
JavaÓïÑÔÒýÈëÁËJavaÐéÄâ»ú£¬¾ßÓпçƽ̨ÔËÐеŦÄÜ£¬Äܹ»ºÜºÃµØÊÊÓ¦¸÷ÖÖWebÓ¦Óá£Í¬Ê±£¬ÎªÁËÌá¸ßJavaÓïÑÔµÄÐÔÄܺͽ¡×³ÐÔ£¬»¹ÒýÈëÁËÈçÀ¬»ø»ØÊÕ»úÖƵÈй¦ÄÜ£¬Í¨¹ýÕâЩ¸Ä½øÈÃJava¾ßÓÐÆä¶ÀÌصŤ×÷ÔÀí¡£
1£®JavaÐéÄâ»ú
JavaÐéÄâ»ú£¨Java Virtual Machine£¬JVM£©ÊÇÈí¼þÄ£ÄâµÄ¼ÆËã»ú£¬Ëü¿ÉÒÔÔÚÈκδ¦ÀíÆ÷ÉÏ£¨ÎÞÂÛÊÇÔÚ¼ÆËã»úÖл ......