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

Ò»¸ö¾­µäµÄ JAVA ME ÊÖ»ú³ÌÐòÈëÃż¶Ô´Âë

Ò»¸ö¾­µäµÄ JAVA ME ÊÖ»ú³ÌÐòÈëÃż¶Ô´Âë
 Ò»¸öÓÉ Carol Hamer дµÄ±È½ÏÓдú±íÐÔµÄÔ´Â룬×÷ÕßÈ«Á¦ÍƼö£¬ÓÈÆäÊǶÔÓÚûÓÐ J2ME ¿ª·¢¾­ÑéµÄÅóÓÑ¡£×Ô¼º¶¯ÊÖÇóöÒÔÏÂÌù³öµÄ Hello.java ºÍ HelloCanvas.java Ô´Â룬²¢ÔËÐУ¬ÓÃÐÄÌå»áһϡ£ÏàÐÅÄãÀí½âÁË´ËÔ´ÂëÖ®ºó£¬¼´¿É²½Èë J2ME ¿ª·¢¡£
×¢ÊͶ¼ÔÚÔ´ÂëÀÔËÐл·¾³×Ô¼ºÅ䣬×Ô¼º¶¯ÊÖ¿´ÔËÐÐЧ¹û£¬Àí½âÖ®ºó£¬È»ºó¶¯ÊÖÐÞ¸ÄÒ»ÏÂÔ´Â룬J2ME ¿ª·¢£¬Äã¿ÉÒԵģ¡
Hello.java Ô´Â룺
package net.frog_parrot.hello;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/**
* This is the main class of the hello world demo
*
* @author Carol Hamer
*
*/
public class Hello extends MIDlet implements CommandListener {

/**
* The canvas is the region of the screen that has bean alloted to the game
*/
HelloCanvas myCanvas;

/**
* The Command objects apears as buttons.
*/
private Command exitCommand = new Command("Exit",Command.EXIT,99);

/**
* The Command objects apears as buttons.
*/
private Command newCommand = new Command("Toggle Msg",Command.SCREEN,1);

/**
* initialize the canvas and the commands
*/
public Hello() {
myCanvas = new HelloCanvas(Display.getDisplay(this));
myCanvas.addCommand(exitCommand);
myCanvas.addCommand(newCommand);
myCanvas.setCommandListener(this);
}
//--------------------------------
// implementation of MIDlet

/**
* Start the application
*/
protected void startApp() throws MIDletStateChangeException {
myCanvas.start();
}

/**
* This method is called to notify the MIDlet to enter a paused state.
* The MIDlet should use this opportunity to release shared resources.
*/
protected void pauseApp() {
}

/**
* If the MIDlet was using resources,it should release them in this method
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}

//-----------------------
// implementation of CommandListener.
/**
* Respond to a command issued on the Canvas
* (


Ïà¹ØÎĵµ£º

javaµ÷Óô洢¹ý³Ì

//µ÷Óô洢¹ý³Ì´ø²Î
            CallableStatement ca = conn.prepareCall("{call Login (?,?)}");
            ca.setString(1,username);
         & ......

java ÈÕÆÚ¼ÆËã(¼¸Ììǰºó)

public class DateTest {
 public static void main(String[] args) {
  Date date = new Date(); // н¨Ò»¸öÈÕÆÚ
  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // ¸ñʽ»¯ÈÕÆÚ
  String beforeDate = sdf.format(getDateBefore(date, 10));
  System ......

»ùÓÚJavaµÄ¼òÒײ¥·ÅÆ÷

 ÔÚJava AplicationÖÐʵÏֵļòÒײ¥·ÅÆ÷¡£À´Ô´ÓÚºúÇɶàÖ÷±àµÄ¡¶Java³ÌÐòÉè¼Æ°¸Àý½Ì³Ì¡·
ÎÒÊÔÔËÐйýÁË£¬ÆäÖÐµÄ “Ìýº£.wav”,“Ò»¶¨Òª°®Äã.wav”ÒôƵÎļþÒª·ÅÔÚclassËùÔÚµÄÎļþ¼ÐÖУ¬ÇÒÖ»Ö§³Öwav¸ñʽ
Ô´´úÂ룺
import java.applet.Applet;
import java.applet.AudioClip;
import javax.swing.* ......

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ1ÕÂ

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ1ÕÂ
www.wesiedu.com   2009-5-5   ÔÚÏßÄ£Ä⿼³¡
¶þ¡¢¿Î³ÌÄÚÈÝÓ뿼ºËÄ¿±ê
µÚ1Õ JavaÓïÑÔ»ù´¡
(Ò»)¿Î³ÌÄÚÈÝ
1.1 JavaÓïÑÔµÄÌØµã
1.2 JavaÓ¦ÓóÌÐòºÍСӦÓóÌÐò
1.3 Java³ÌÐòµÄ¿ª·¢¹ý³Ì
1.4±êʶ·ûºÍ¹Ø¼ü×Ö
l.5»ù±¾Êý¾ÝÀàÐÍ
1.5.1 Âß¼­ÀàÐÍ
1 ......

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ4ÕÂ

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ4ÕÂ
www.wesiedu.com   2009-5-5   ÔÚÏßÄ£Ä⿼³¡
µÚ4Õ Êý×éºÍ×Ö·û´®
(Ò»)¿Î³ÌÄÚÈÝ
4.1 Êý×é
4.1.1 һάÊý×é
4.1.2 ¶àάÊý×é
4.2 ×Ö·û´®
4.2.1 ×Ö·û´®³£Á¿
4.2.2 ×Ö·û´®ÉùÃ÷ºÍ´´½¨
4.2.3 ×Ö·û´®»ù±¾²Ù×÷
4.2.4 StringTokenizerÀà
4.2.5×Ö· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ