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

JavaÖеÄÊó±êʼþºÍ¼üÅÌʼþ

http://www.cnblogs.com/rookieport/archive/2005/09/05/163393.html
ÁôÏÂÔ­´´×÷ÕßµÄÁ´½Ó  10¸öÀý×Ó
ÁíÍ⻹ÓÐһƪ
//ÀûÓà java.awt.Robot ÀàÀ´×Ô¶¯Íê³ÉһЩ¼üÅÌ»òÊó±êµÄ¶¯×÷,ÏÂÃæÊÇÒ»¸öСÀý×Ó
//³ÌÐòÁ÷³Ì:Ä£ÄâÊó±ê×ó¼üµã»÷ ¿ªÊ¼-->ÔËÐÐ-->CMD-->DIR-->CLS-->EXIT
//Ä£ÄâÓÒ¼üµã»÷ Òƶ¯µ½ÓÒϽÇ-->ÓÒ¼üµã»÷-->µ÷ÕûÈÕÆÚºÍʱ¼ä-->Í˳ö
import java.awt.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
//Test.java
public class Test {
public static void main(String[] args) throws Exception {
final Robot rb = new Robot();
new Thread(){
public void run(){
rb.delay(2000);
//»Ø³µ
rb.keyPress(KeyEvent.VK_ENTER);
rb.keyRelease(KeyEvent.VK_ENTER);
}
}.start();
JOptionPane.showMessageDialog(null,"ÒÔϳÌÐò×Ô¶¯Ö´ÐÐ,°üÀ¨±¾¶Ô»°¿ò,Çë²»±Ø½øÐÐÈËΪ¸ÉÔ¤.\nÈç¹û²»ÄÜÕý³£Ö´ÐгÌÐò,ÇëÏȹرÕÊäÈë·¨");

//ÉèÖÿªÊ¼²Ëµ¥µÄ´ó¸ÅλÖÃ
int x = 40;
int y = Toolkit.getDefaultToolkit().getScreenSize().height-10;

//Êó±êÒƶ¯µ½¿ªÊ¼²Ëµ¥,
rb.mouseMove(x,y);
rb.delay(500);

//µ¥»÷Èý´Î¿ªÊ¼²Ëµ¥
for(int i=0; i<3; i++)
pressMouse(rb,InputEvent.BUTTON1_MASK,500);
rb.delay(1000);
//ÔËÐÐCMDÃüÁî r cmd enter
int[] ks = {KeyEvent.VK_R,KeyEvent.VK_C,KeyEvent.VK_M,KeyEvent.VK_D,KeyEvent.VK_ENTER,};
pressKeys(rb,ks,500);
rb.mouseMove(400,400);
rb.delay(500);
//ÔËÐÐDIRÃüÁî dir enter
ks = new int[]{KeyEvent.VK_D,KeyEvent.VK_I,KeyEvent.VK_R,KeyEvent.VK_ENTER};
pressKeys(rb,ks,500);
rb.delay(1000);
//ÔËÐÐCLSÃüÁî cls enter
ks = new int[]{KeyEvent.VK_C,KeyEvent.VK_L,KeyEvent.VK_S,KeyEvent.VK_ENTER};
pressKeys(rb,ks,500);
rb.delay(1000);
//ÔËÐÐEXITÃüÁî exit enter
ks = new int[]{KeyEvent.VK_E,KeyEvent.VK_X,KeyEvent.VK_I,KeyEvent.VK_T,KeyEvent.VK_ENTER};
pressKeys(rb,ks,500);
rb.delay(1000);

//ÓÒ¼ü²âÊÔ
x=Toolkit.getDefaultToolkit().getScreenSize().width-10;
rb.mouseMove(x, y);
//Èç¹ûÊÇË«¼üÊó±ê,Çë¸ÄÓÃInputEvent.BUTTON2_MASKÊÔÊÔ,ÎÒûÓÐÕâÖÖÊó±ê
pressMouse(rb,Inp


Ïà¹ØÎĵµ£º

javaÔÓÏë

²ÉÓÃÓûÑïÏÈÒÖµÄÊÖ·¨Ì¸Ì¸java:
      javaûÓÐÖ¸ÕëÖ»ÓÐÒýÓÃÊÇ×î´óµÄ°Ü±Ê.ÕýÒòΪûÓÐÖ¸Õë,ºÜ¶à²Ù×÷ÒªÓØ»ØÍñת;À¬»øÊÕ¼¯»úÖÆÒ²¾õµÃÊǼ¦Àß,д¸öÎö¹¹º¯ÊýÕæµÄÄÇô¸´ÔÓÂð, ÓбØÒªÎþÉüÁé»îÐÔÂð;º¯Êýµ÷ÓõĴú¼ÛÖ®¸ßÈÃÈË×¥¿ñ
µ«ÎÒ»¹ÊÇÑ¡ÔñÁËËý:
      javaµÄ´¿ÃæÏò¶ÔÏóÌØ ......

java¶ÔÏóÐòÁл¯Ñ§Ï°±Ê¼Ç

    ÐòÁл¯µÄ¹ý³Ì¾ÍÊǶÔÏóдÈë×Ö½ÚÁ÷ºÍ´Ó×Ö½ÚÁ÷ÖжÁÈ¡¶ÔÏó¡£½«¶ÔÏó״̬ת»»³É×Ö½ÚÁ÷Ö®ºó£¬¿ÉÒÔÓÃjava.io°üÖеĸ÷ÖÖ×Ö½ÚÁ÷ÀཫÆä±£´æµ½ÎļþÖУ¬¹ÜµÀµ½ÁíÒ»Ïß³ÌÖлòͨ¹ýÍøÂçÁ¬½Ó½«¶ÔÏóÊý¾Ý·¢Ë͵½ÁíÒ»Ö÷»ú¡£¶ÔÏóÐòÁл¯¹¦Äܷdz£¼òµ¥¡¢Ç¿´ó£¬ÔÚRMI¡¢Socket¡¢JMS¡¢EJB¶¼ÓÐÓ¦Ó᣶ÔÏóÐòÁл¯ÎÊÌâÔÚÍøÂç±à³ÌÖв¢²»ÊÇ× ......

JavaÖм¯ºÏ


JavaÌṩÁËÊýÖÖ³ÖÓжÔÏóµÄ·½Ê½£¬°üÀ¨ÓïÑÔÄÚÖõÄArray£¬»¹ÓоÍÊÇutilitiesÖÐÌṩµÄÈÝÆ÷Àà(container
classes)£¬ÓÖ³ÆȺ¼¯Àà(collection classes)¡£¼¯ºÏÔÚjavaÖзdz£ÖØÒª£¬ÔÚÌÖÂÛ֮ǰ£¬ÏÈÀ´¿´¼¸¸öÃæÊÔÖеľ­µäÎÊÌâ¡£ 
1 Collection ºÍ
CollectionsµÄÇø±ð¡£ 
2 List, Set, MapÊÇ·ñ¼Ì³Ð×ÔCollection½Ó¿Ú¡£  ......

C++ºÍJavaÖÐÀàÒýÓõÄÇø±ð


¡¡ÔÚC++ºÍJavaÖж¼´æÔÚÀàÒýÓã¬C++ÖÐÊÇÒªÃ÷È·Ö¸³öµÄ£¬ÏÔÐÔµÄ;¶øJavaÖÐÊÇÒþÐεġ£
¡¡¡¡ÔÚC++ÖУ¬"T &b=a;" ˵Ã÷bÊÇaµÄÒýÓã¬Á½ÕßÊÇͬÃû£¬Ö¸µÄͬһ¸ö¶«Î÷¡£¶ø·ÇÖ¸ÕëµÄÀàÉùÃ÷£¬¾Íͬʱ´´½¨ÁËÒ»¸öÀ࣬Èç"T a;"ʵ¼ÊÉÏaÒѾ­ÊµÀý»¯ÁË¡£¶øÉùÃ÷ÀàÒýÓÃʱ²»ÐèÒª´´½¨Ð¶ÔÏ󣬶øÊÇÖ±½ÓÖ¸ÏòÔ­À´µÄ¶ÔÏó¡£
¡¡¡¡ÀàÒýÓÃÔÚº¯ÊýµÄÐβκͷ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ