Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃJava´úÂë²é¿´ÏµÍ³Ä¬ÈÏ×Ö·û¼¯±àÂë

public class EchoDefaultSystemEncoding
{
    public static void main(String[] args)
    {
           String encoding = System.getProperty("file.encoding");
           System.out.println("Default System Encoding:" + encoding);
    }
}


Ïà¹ØÎĵµ£º

JavaÉè¼Æģʽ֮:IteratorÁ´±íģʽ

ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔ­Àí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËغ͸ÃÔªËصĽڵ㡣
public class NodeBean implements Serializable
{
   
    private Object data; //ÔªËر¾Éí
    private NodeBean next; //ÏÂÒ»¸ö½Úµã
   
  &n ......

javaѧϰ·½·¨×ܽá

Èç¹ûÄãjavaÒѾ­ÈëÃÅÁË£¬½¨ÒéÄãÏȲ»È¥Ïë´úÂë¡£¶øÊÇÈ¥ÏëÍê³ÉÈÎÎñÒª×öµÄ²½Öè¡£ÏëºÃÁ˺óÄÄÅÂÄãÈ¥Õ³Ìù´úÂ붼¿ÉÒÔ¡£±à³ÌÊÇ¿¼ÑéµÄ˼ά£¬²»ÊÇд´úÂëµÄËٶȣ¬ºÍ¶Ô´úÂëµÄ¼ÇÒäÐÔ¡£
±à³ÌÊÇÒ»¼þ¾­Ñé»î, ²»ÊÇ¿´ÊéÄܽâ¾öµÄ, ±à³ÌÖÐÓöµ½µÄÎÊÌâǧÆæ°Ù¹Ö, ¸ù±¾²»ÊÇÒ»±¾Êé»òÕßn±¾ÄܸøÄã½â¾öµÄ£¬±ØÐë×Ô¼ºÇ××ÔÈ¥Ìå»á
 
ËùÒÔ, ÕÒ±¾ÓÐʵÀýµ ......

java ´íÎó´úÂëÌáʾ

 //=============================Êä³öÆæÊý
public class OddTest {
public static boolean isOdd(int i){
return i % 2 != 0; //±È½Ï i % 2 == 0;×¢£º -1%2 = -1
}
public static void main(String[] args) {
for(int i = -10; i <= 10; i++) {
System.out.println(isOdd(i));
}
}
}
// ......

Java SWT ´°¿Ú¾ÓÖжÔÆë

public static void CentreWnd(Shell shell){
int width = shell.getMonitor().getClientArea().width;
int height = shell.getMonitor().getClientArea().height;
int x = shell.getSize().x;
int y = shell.getSize().y;
if (x > width) {
shell.getSize().x = width;
}
if (y > height) ......

java²¢·¢±à³Ìʵ¼ù ±Ê¼Ç£¨1£©

Ḭ̈߳²È« ʲôÊÇḬ̈߳²È«(thread-safe)£¿ Ò»¸öÀ࣬Èç¹ûÄܹ»ÔÚ¶àÏ̲߳¢·¢·ÃÎʵĻ·¾³Ï£¨²»¹ÜÏ̷߳ÃÎʵÄ˳Ðò£©ÕýÈ·±íÏÖ×Ô¼ºµÄÐÐΪ£¬²¢ÇÒÎÞÐèÍⲿµ÷ÓÃÌí¼ÓÈκÎͬ²½Ö®ÀàµÄ²Ù×÷£¬Õâ¸öÀà¾ÍÊÇḬ̈߳²È«µÄ¡£
Õâ¸öÕýÈ·ÐÔ¿ÉÒÔÕâôÀí½â£¬¾ÍÊÇ˵¶àÏ̷߳ÃÎʵĽá¹û²»»á²»Í¬ÓÚµ¥Ï̵߳ķÃÎÊ¡£
Ḭ̈߳²È«µÄÀ಻ÐèÒªÍⲿµ÷ÓÃÌá¹©È ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ