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

javaϵͳ¼à¿ØCPU ´ÅÅÌ


import java.io.*;   
  
/**
* linux ÏÂcpu ÄÚ´æ ´ÅÅÌ jvmµÄʹÓÃ¼à¿Ø
* @author avery_leo
*
*/  
public class TT {   
    /**
      * »ñÈ¡cpuʹÓÃÇé¿ö
      * @return
      * @throws Exception
      */  
    public double getCpuUsage() throws Exception {   
        double cpuUsed = 0;   
  
         Runtime rt = Runtime.getRuntime();   
         Process p = rt.exec("top -b -n 1");// µ÷ÓÃϵͳµÄ“top"ÃüÁî   
       
  
         BufferedReader in = null;   
        try {   
             in = new BufferedReader(new InputStreamReader(p.getInputStream()));   
             String str = null;   
             String[] strArray = null;   
           
            while ((str = in.readLine()) != null) {   
                int m = 0;   
                   
                if (str.indexOf(" R ") != -1) {// Ö»·ÖÎöÕýÔÚÔËÐеĽø³Ì£¬top½ø³Ì±¾Éí³ýÍâ &&am


Ïà¹ØÎĵµ£º

Java½â¶ÁÄڴ棬ÓÅ»¯±à³Ì

      Ò».´úÂëÓÅ»¯
¡¡¡¡ÄÚ´æ»áÒç³ö¿Ï¶¨ºÍ´úÂëÌÓ²»Á˹ØÏµ,99.99%ѧjavaµÄÈ˶¼ÖªµÀÀ¬»ø»ØÊÕÆ÷ÊÇ javaµÄÒ»´óÓŵ㲢¾Ý´ËÀ´³°Ð¦C++¡£ÏÔÈ»Õâ¸öÌØÐÔΪ´úÂë±àдÕßÊ¡Á˲»ÉÙÊ£¬µ«Õâ¸öÌØÐÔÈ´´øÀ´Á˲»ÉÙÒþ»¼¡£¾Ù¸öÀý×ÓÔÚÓÎÏ·µ±Öо­³£Óв»Í¬³¡¾°µÄÇл»£¬Èç´ÓÓÎÏ·Âß¼­Í˵½Ö÷²Ëµ¥Âß¼­,¶ÔÓÎÏ·Âß¼­¶ÔÏóµÄ̬¶ ......

JAVA¶ÁÊé±Ê¼Ç£¨¶þ£©

²Ù×÷·û
1.λ²Ù×÷·û
(a) >>>ÓÒÒÆ£¬¸ßλÓÃ0Ìî³ä£»
int a = 14;
int b = 2;
System.out.println(a >>> b);// 3
int c = -14;
int d = 2;
System.out.println(c >>> d);// 1073741820
(b) >>·ûºÅλ²»±ä£¬ÆäËûλÓÒÒÆ£¬¸ßλÓÃ0Ìî³ä£¬Æä½á¹ûÓëa/2bÏàͬ£»
int a = 14;
int b = 2;
Sy ......

ÿ¸öJava³õѧÕß¶¼¸ÃÃ÷°×µÄÎÊÌâ

ÿ¸öJava³õѧÕß¶¼Ó¦¸ÃÃ÷°×µÄÎÊÌâ
¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ­³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾­µäÀÏÌù¡£
¡¡¡¡ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
¡¡¡¡Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄ ......

Java Web¿ª·¢£¬ÄãÒ»¶¨»áÓöµ½

Java Web¿ª·¢ÖУ¬ÓÐÐí¶à¹²Í¨µÄÎÊÌ⣬ÊÇ¿ª·¢ÈËÔ±ÔÚ¿ª·¢¹ý³ÌÖÐÒ»¶¨»áÓöµ½µÄ£¬ÐèÒª´¦ÀíµÄÎÊÌ⣺
1.  ÂÒÂëÎÊÌâ
ΪºÎ»á³öÏÖÂÒÂëÎÊÌ⣿¼ÈÈ»ÓÐÂÒÂëÎÊÌ⣬¿Ï¶¨ÊÇÓÉÓÚ±àÂëÉèÖõIJ»Ò»Öµ¼Öµġ£ÔÚWeb¿ª·¢
¹ý³ÌÖУ¬Éæ¼°ÒÔÏÂһЩ±àÂëÉèÖ㬿ͻ§¶Ë²ÎÊýµÄ±àÂëÉèÖã¬Web·þÎñÆ÷µÄ±àÂëÉèÖ㬷þÎñÆ÷¶ËÓ¦ÓóÌÐòµÄ±àÂëÉèÖã¬Êý¾Ý¿â ......

java jdbc


JDBC£º
    |-- Êý¾Ý¿â»¥Áª¡£
    |-- ÓÉSUN¹«Ë¾ËùÖÆ¶¨µÄÓÃÀ´·ÃÎÊÊý¾Ý¿âµÄ¹æ·¶¡£
    |-- Êý¾Ý¿âÊý¾Ý <= ½»»¥ => Ó¦ÓóÌÐò¡£
JDBC°üº¬Ö÷ÒªÁ½¸ö²¿·Ö£º
    |-- part 1.ÓÉSUN¹«Ë¾Öƶ¨µÄ¹æ·¶½Ó¿Ú
        |-- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ