JavaÄÚ²¿ÀàµÄ×÷ÓÃ
Ò»¡¢ ¶¨Òå
·ÅÔÚÒ»¸öÀàµÄÄÚ²¿µÄÀàÎÒÃǾͽÐÄÚ²¿Àà¡£
¶þ¡¢ ×÷ÓÃ
1.ÄÚ²¿Àà¿ÉÒԺܺõÄʵÏÖÒþ²Ø,Ò²¾ÍÊÇ·â×°ÐÔ¡£Ò»°ãµÄ·ÇÄÚ²¿À࣬ÊDz»ÔÊÐíÓÐ private ÓëprotectedȨÏ޵ģ¬µ«ÄÚ²¿Àà¿ÉÒÔ
2.ÄÚ²¿ÀàÓµÓÐÍâΧÀàµÄËùÓÐÔªËصķÃÎÊȨÏÞ
3.¿ÉÊÇʵÏÖ¶àÖؼ̳Ð
4.¿ÉÒÔ±ÜÃâÐ޸ĽӿڶøʵÏÖͬһ¸öÀàÖÐÁ½ÖÖͬÃû·½·¨µÄµ÷ÓÃ
Èý¡¢ Àý×Ó
1.ʵÏÖÒþ²Ø
ƽʱÎÒÃǶÔÀàµÄ·ÃÎÊȨÏÞ£¬¶¼ÊÇͨ¹ýÀàÇ°ÃæµÄ·ÃÎÊÐÞÊηûÀ´ÏÞÖƵģ¬Ò»°ãµÄ·ÇÄÚ²¿À࣬ÊDz»ÔÊÐíÓÐ private ÓëprotectedȨÏ޵ģ¬µ«ÄÚ²¿Àà¿ÉÒÔ£¬ËùÒÔÎÒÃÇÄÜͨ¹ýÄÚ²¿ÀàÀ´Òþ²ØÎÒÃǵÄÐÅÏ¢¡£¿ÉÒÔ¿´ÏÂÃæµÄÀý×Ó
Java´úÂë
1. package beyondx;
2.
3. public class Example {
4.
5. private class InsideClass implements InterfaceTest
6. {
7. public void test()
8. {
9. &nb
Ïà¹ØÎĵµ£º
½øÒ»·¨£º ¼´Ê¡ÂÔµÄλÉÏÖ»Òª´óÓÚÁ㶼Ҫ½øһλ £»
ËÄÉáÎåÈë·¨£º ¼´Ê¡ÂÔµÄλÉÏСÓÚÎ嶼ҪÉáÈ¥£¬µ«Ê¡ÂÔµÄλÉÏÂúÎ嶼Ҫ½øһλ £»
»¹ÓÐÒ»ÖÖ
ȥβ·¨£º ¼´Ê¡ÂÔµÄλÉϲ»¹ÜÊÇ·ñÂúÎ嶼ҪÉáÈ¥ £»
1¡¢³ý·¨´øСÊý
ÀýÈ磺
int a = 8;
int b = 3;
int c = ((double)la)/b;
System.out.println(c); ......
ÃæÊÇÎÒÈÏΪÕýÈ·µÄ×ö·¨£¨½áºÏ×Ô¼ºµÄ¾ÑéдµÄ£¬Èç¹û²»ÕýÈ·£¬Çë´ó¼ÒÖ¸Õý£©£º
¡¡¡¡ÎҵĻæͼ¿Ø¼þÊÇJPanel£¬
¡¡¡¡³öÏÖ¹ö¶¯ÌõµÄÇ°Ìᣬ±ØÐëÈûæͼ¿Ø¼þ·ÅÔÚJScrollPaneÉÏ£¬
¡¡¡¡¶ÔÓÚJScrollPaneµÄLayout£¬Ã»ÓÐÌØÊâÒªÇó£¬ÏÂÃæÕâÑù¼´¿É£º
¡¡¡¡view plaincopy to clipboardprint?
¡¡¡¡jScrollPane1.setViewportView(jPanel1);
¡¡ ......
// messages.hello.properties
id=001
name=ϧԵ
love=I think,therefor i am.
friends=Hi! {0} and {1} ,how are you?
// org.PropertiesUtil.java
package org;
import java.io.UnsupportedEncodingException;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.MissingResourceEx ......
//ÅÅÐòºÍ²éÕÒÊÇÊý¾Ý½á¹¹ÓëËã·¨Éè¼ÆµÄÖØÒªÄÚÈÝ
/*
ÅÅÐòÖ÷Òª°üÀ¨
1.²åÈëÅÅÐò£ºÓÖ°üÀ¨Ö±½Ó²åÈëÅÅÐò¡¢¶þ·Ö·¨²åÈëÅÅÐò¡¢±í²åÈëÅÅÐò¡¢ShellÅÅÐò
2.Ñ¡ÔñÅÅÐò£º°üÀ¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò
3.½»»»ÅÅÐò£ºÃ°ÅÝÅÅÐò¡¢¿ìËÙÅÅÐò
4.·ÖÅäÅÅÐò£ºÖ÷ÒªÓлùÊýÅÅÐò
5.¹é²¢ÅÅÐò£ºÖ÷ÒªÓÐÄÚÅÅÐò¡¢ÍâÅÅÐò
×¢£ºÒÔϳÌÐò¾ùÔÚ±¾È˵çÄÔÉÏͨ¹ýÍêÕ ......
Ãô½Ý¿ª·¢µÄÀíÄîÒѾÁ÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά
»¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸ ......