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

javaдµÄÑî»ÔÈý½Ç

import javax.swing.JOptionPane;
public class San {
    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
           String rowString;
           int rowInt;
          
           rowString = JOptionPane.showInputDialog("lines£º");
           rowInt = Integer.parseInt(rowString);
          
           int triangle[][]=new int[rowInt][rowInt * 2 - 1];
          
           for(int i = 0;i < rowInt;i++){
                  for(int j = 0;j < rowInt * 2 -1;j++){
                      triangle[i][j] = -1;
                  }
              }
          
           for(int i = 0;i < rowInt;i++){
               triangle[(rowInt * 2 - 1) / 2 - i][i] = 1;
               triangle[(rowInt * 2 - 1) / 2 - i][rowInt * 2 - 1 - i - 1] = 1;
     


Ïà¹ØÎĵµ£º

javaÓïÑÔSUN¹«Ë¾±ê×¼±àÂë¹æ·¶

JavaÓïÑÔ±àÂë¹æ·¶(Java Code Conventions)SUN±ê×¼
 
 
1 ½éÉÜ(Introduction)1.1 ΪʲôҪÓбàÂë¹æ·¶(Why Have Code Conventions)1.2 °æȨÉùÃ÷(Acknowledgments)2 ÎļþÃû(File Names)2.1 Îļþºó׺(File Suffixes)2.2 ³£ÓÃÎļþÃû(Common File Names)3 Îļþ×éÖ¯(File Organization)3.1 JavaÔ´Îļþ(Java Source Fi ......

JAVA ×Ö·û´®±àÂë×ܽá

 String newStr = new String(oldStr.getBytes(), "UTF-8");    
 
javaÖеÄStringÀàÊÇ°´ÕÕunicode½øÐбàÂëµÄ£¬µ±Ê¹ÓÃString(byte[] bytes, String encoding)¹¹Ôì×Ö·û´®Ê±£¬encodingËùÖ¸µÄÊÇbytesÖеÄÊý¾ÝÊÇ°´ÕÕÄÇÖÖ·½Ê½±àÂëµÄ£¬¶ø²»ÊÇ×îºó²úÉúµÄStringÊÇʲô±àÂ뷽ʽ£¬»»¾ä»°Ëµ£¬ÊÇÈÃϵ ......

ÔÚJavaÖÐËøÎļþµÄÀý×Ó

1.Èç¹ûÔÚÏÂÃæµÄ´úÂëÖУ¬tryLock¸Ä³Élock£¬ÄÇô»áÒ»Ö±µÈ´ý£¬Ö±µ½Äܹ»ËøÉÏÎļþΪֹ£¬µ«tryLock»áÁ¢¼´·µ»Ø¡£
Èç¹ûÒ»¸öµ÷ÓÃÁËtryLock£¬»òlock²¢Çҳɹ¦ËøÉÏÖ¸¶¨ÎļþºóµÄ³ÌÐò£¬ÔÚûÓÐÊÍ·ÅÎļþËøµÄÇé¿öÏ£¨Ã»Óе÷ÓÃrelease£©³ÌÐò¾Í½áÊø£¨°üº¬Ç¿ÖƽáÊøµÄÇé¿ö£©£¬ÄÇôÎļþËø»á×Ô¶¯±»ÊÍ·Å¡£
2.´úÂëÖеÄsleepÊÇΪÁ˱ãÓÚÑéÖ¤³ÌÐòÓõġ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ