java±Ê¼Ç
½ñÌìÖØÐÂÕûÀíµçÄÔ£¬ÕÒµ½Ò»¸öÎļþ£¬¿´ÁËÏÂÈÕÆÚ£¨2006.11.3£© £¬Å²»Ð¡ÐÄÔÙ¶ªÁË£¬´æµ½ÍøÉÏÀ´É¹É¹¡£
¹Ø¼ü×ÖÓֳƱ£Áô×Ö£¬ÊÇ Java ÓïÑԹ涨ÁËÌØ¶¨º¬ÒåµÄ±êʶ·û¡£Óû§Ö»Äܰ´ÕÕϵͳ¹æ¶¨µÄ·½Ê½Ê¹Ó㬲»ÄÜ×ÔÐж¨Òå¡£¹Ø¼ü×ÖÒ»ÂÉÓÃСд×Öĸ±íʾ¡£Java ÖеĹؼü×ÖÓÐ 50 ¸ö£¬°´ÓÃ;»®·ÖΪ£ºÊý¾ÝÀàÐÍ¡¢Óï¾ä¡¢ÐÞÊΡ¢·½·¨¡¢Àà¡¢½Ó¿Ú¡¢°ü¡£
¹Ø¼ü×Ö£º
abstract break byte boolean catch case class char continue default double do else extends false final float for finally if import implements int interface instanceof long length native new null package private protected public final return switch synchronized short static super try true this throw throws threadsafe transient void while
ÀàµÄÑϸñ¶¨Òå¼°ÐÞÊÎ×Ö
[ÀàµÄÐÞÊÎ×Ö] class ÀàÃû³Æ [extends ¸¸ÀàÃû³Æ][implements ½Ó¿ÚÃû³ÆÁбí]
{
±äÁ¿¶¨Òå¼°³õʼ»¯£»
·½·¨¶¨Òå¼°·½·¨Ì壻
}
ÀàµÄÐÞÊÎ×Ö£º [public] [abstract | final]
ȱʡ·½Ê½Îª friendly
³ÉÔ±±äÁ¿µÄ¶¨Òå¼°ÐÞÊÎ×Ö
[±äÁ¿ÐÞÊÎ×Ö] ±äÁ¿Êý¾ÝÀàÐÍ ±äÁ¿Ãû1,±äÁ¿Ãû2[=±äÁ¿³õÖµ]…;
[public | protected | private ] [static] [final ] [transient ][volatile]
³ÉÔ±±äÁ¿µÄÀàÐÍ¿ÉÒÔÊÇJavaÖÐÈÎÒâµÄÊý¾ÝÀàÐÍ£¬°üÀ¨¼òµ¥ÀàÐÍ£¬À࣬½Ó¿Ú£¬Êý×é¡£ÔÚÒ»¸öÀàÖеijÉÔ±±äÁ¿Ó¦¸ÃÊÇΨһµÄ¡£
µÚ3Õ ÔËËã·û ±í´ïʽºÍÓï¾ä
3.1ÔËËã·ûÓë±í´ïʽ
3 ËãÊý»ìºÏÔËËãµÄ¾«¶È
byte short int long float double
3.2 Óï¾ä
(1)·½·¨µ÷ÓÃÓï¾ä
System.out.println("He
Ïà¹ØÎĵµ£º
´óѧJAVAʵÑéÎå
ÕâÒ»´ÎµÄʵÑé×öµÄ²»ÂúÒ⣬¿ÒÇë¸÷λÅúÆÀ£¬¿ÒÇë¸÷λÌṩ·½·¨¼°½¨Òé
µÚÒ»¸öʵÑé
Ö¸¶¨²»Í¬ÐÒéµÄURLµØÖ·£¬»ñµÃ×ÊÔ´ÎļþµÄÄÚÈݺÍÊôÐÔ
URLStudy.java
package first;
import java.awt.FileDialog;
import java.awt.Font;
import java.awt.TextArea;
import java.io.FileWriter ......
oracle
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl";
String user="scott";
String password="tiger";
Connection conn= DriverManager.getConnection(url,user,password);
Statement stmt=conn.createStatement(ResultSet.TYPE_S ......
ʹÓÃJava ME¼¼Êõ¿ª·¢ÊÖ»úÃÜÂë¹ÜÀíÈí¼þ
³ÂÔ¾·å
ÕªÒª£ºJava ME¼¼ÊõÊÇ3G¿ª·¢Ö÷Á÷µÄ¼¼ÊõÖ®Ò»£¬±¾ÎĽ«Í¨¹ýϵͳµÄ·½Ê½½éÉÜÈçºÎʹÓÃJava ME¼¼Êõ¿ª·¢ÃÜÂë¹ÜÀíÈí¼þ£¬Ê¹´ó¼ÒÄܹ»Í¨¹ý¸ÃÎÄÕ¿ìËÙÊìϤJava ME¼¼Êõ£¬½øÈë3GÒÆ¶¯³ÌÐò¿ª·¢µÄ´óÃÅ£¡
¹Ø¼ü×Ö£ºJava ME ÊÖ»ú ÃÜÂë ¹ÜÀí ¼Ç¼´æ´¢
......
1¡¢set¼¯ºÏÊÇ×î¼òµ¥µÄÒ»ÖÖ¼¯ºÏ£¬¼¯ºÏÖв»°´Ö¸¶¨µÄ·½Ê½ÅÅÐò£¬²¢ÇÒûÓÐÖØ¸´¶ÔÏó¡£
2¡¢set½Ó¿ÚÖ÷ÒªÓÐÁ½¸öʵÏÖÀࣺHashSetºÍTreeSet
(1)HashSet:Êǰ´ÕÕ¹þÏ£Ëã·¨À´½øÐдæÈ¡¼¯ºÏÖеĶÔÏ󣬴æÈ¡µÄËٶȱȽϿ졣
(2)TreeSet£ºÊµÏÖÁËSortedSet½Ó¿Ú£¬¾ßÓÐÅÅÐòµÄ¹¦ÄÜ¡£
3¡¢HashSetÀàÊǰ´ÕÕ¹þÏ£Ëã·¨À´´æÈ¡ ......
1.1 ²»ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀý
ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀýʱ£¬¹¹Ô캯ÊýÁ´ÖеÄËùÓй¹Ô캯Êý¶¼»á±»×Ô¶¯µ÷Óᣵ«Èç¹ûÒ»¸ö¶ÔÏóʵÏÖÁËCloneable½Ó¿Ú£¬ÎÒÃÇ¿ÉÒÔµ÷ÓÃËüµÄclone()·½·¨¡£clone()·½·¨²»»áµ÷ÓÃÈκÎÀ๹Ô캯Êý¡£
ÔÚʹÓÃÉè¼ÆÄ£Ê½£¨Design Pattern£©µÄ³¡ºÏ£¬Èç¹ûÓÃFactoryģʽ´´½¨¶ÔÏó£¬Ôò¸ÄÓÃclone()·½·¨´´½¨Ðµ ......