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

´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓƵ1 API ×Ôѧ±Ê¼Ç

2009-12-20 22:15:02
½ñÌ컨ÁËÒ»Ììʱ¼ä°Ñ´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓƵ1 API¿´ÍêÁË£¬»¹¿´ÁËÒ»²¿·Ö¸ß¼¶Ê³Æ·2 IOµÄÊÓƵ£¬ÒÔÏÂÊÇAPIµÄ±Ê¼Ç¡£
API: Application Programming Interface Ó¦ÓóÌÐò±à³Ì½Ó¿Ú
    windows API£ºwindowsϵͳÌṩµÄ
    JAVA API£ºJDKÖÐÌṩµÄ¸÷ÖÖjavaÀà(ÕÆÎÕ³£ÓõÄAPI¾Í¿ÉÒÔÁË£¬API¿ÉÏÖѧÏÖÓã¬ÏÖÓÃÏÖѧ)¡£
ÔõôËãѧ»áÒ»Ãűà³ÌÓïÑÔ£ºÒÔ¹»ÓÃΪԭÔò£¬ÊʿɶøÖ¹¡£
JAVA IDE£ºJBuilder¡¢Eclipse¡¢NetBeans¡¢JcreatorµÈ¡£
String¡¢StringBuffer¡¢StringBuilderÀà
    StringÀà¶ÔÏóÖеÄÄÚÈÝÒ»µ©±»³õʼ»¯¾Í²»ÄÜÔٸı䡣(String³£Á¿³Ø)
    StringBuffer£º¿É¸Ä±äµÄ×Ö·û´®£¬toString()£¬Ḭ̈߳²È«µÄ¡£
    StringBuilder£º¿É¸Ä±äµÄ×Ö·û´®£¬Ï̲߳»°²È«£¬¸ü¿ì¡£(³£ÓÃ)
    StringBuffer¡¢StringBuilder¶¼¼Ì³Ð×ÔAbstractStringBuilder¡£
¼¯ºÏÀࣺ
    Collection¡¢Set¡¢ListÇø±ð£º
    Collection£º¸÷ÔªËØÖ®¼äûÓÐÖ¸¶¨Ë³Ðò£¬ÔÊÐíÖظ´£¬ÔÊÐí¶à¸önullÔªËØ¡£
    Set£º¸÷ÔªËØÖ®¼äûÓÐÖ¸¶¨Ë³Ðò£¬²»ÔÊÐíÖظ´ÔªËØ£¬×î¶àÔÊÐíÒ»¸önullÔªËØ¡£
    List£º¸÷ÔªËØÖ®¼äÓÐÖ¸¶¨Ë³Ðò£¬ÔÊÐíÖظ´£¬ÔÊÐí¶à¸önullÔªËØ¡£
HashtableÀࣺ<key, value>
    ÓÃ×÷keyµÄÀà±ØÐ븲дObjectµÄhashCode·½·¨ºÍequals·½·¨¡£
    StringBufferºÍStringBuilderÀ಻ÄÜÓÃ×ökey£¬ËüÃÇûÓи²Ð´hashCode·½·¨ºÍequals·½·¨¡£
PropertiesÀࣺHashtable×ÓÀà
    Ôö¼ÓÁ˽«HashtableÖÐkeyºÍvalue±£´æµ½ÎļþºÍ´ÓÎļþÖжÁÈ¡µÄ·½·¨¡£
    Èç¹ûҪʹÓÃPropertiesµÄstore·½·¨´æ´¢£¬ÔòkeyºÍvalue±ØÐëΪString¶ÔÏ󣬷ñÔòÅ׳öClassCastExceptionÒì³£¡£
System¡¢RuntimeÀࣺ
    SystemÀà(·½·¨ºÍÊôÐÔ¶¼ÊÇstatic)
        -exit()
        -currentTimeMillis()£º·µ»Øµ±Ç°Ê±¼äÓëЭµ÷ÊÀ½çʱ 1970 Äê 1 Ô 1 ÈÕÎçÒ¹Ö®¼äµÄʱ¼ä²î£¨ÒÔºÁÃëΪµ¥Î»²âÁ¿£©¡£
        -JavaÐéÄâ»úϵͳÊôÐÔ
        -getProperties¡¢setProperties
    RuntimeÀࣺһ¸öRuntime¶ÔÓ¦Ò»¸öJVM£


Ïà¹ØÎĵµ£º

javaʹÓÃrocksawºÍvserv tcpipʵÏÖ»ùÓÚICMPµÄPing¹¦ÄÜ

Ò»£º×¼±¸ www.savarese.org download
 1.  rocksaw-1.0.0-src.tar.gz
 2.  vserv-tcpip-0.9.2-src.tar.gz
¶þ£º±àÒëÔ´ÎļþµÃµ½jar°ü ʹÓÃAnt
 1.  build vserv-tcpip-0.9.2-src
      ÔÚvserv-tcpip-0.9.2Ŀ¼ÏÂÃ潨һ¸ötestsĿ¼£¬È»ºóÔÚcmd´°¿ÚϽøÈë ......

ʹÓÃObjectSNMPµÄjavaÀý×Ó

ÏÂÃæµÄÀý×Ó£¬¾ÍÊÇʹÓÃObjectSNMP»ñÈ¡RFC1213-MIBµÄÀý×Ó£ºÆäÖеÄsystemºÍifTable¶ÔÏó¾ÍÊǶÔÓ¦µÄSNMP MIBÖеÄsystem×éºÏinterfaceÖеÄifTable±í¡£
class TestMibMapping
{
SNMPAPI snmpapi;
SNMPNodeParam nodeParam;
public TestMibMapping()
{
try
{
/**
......

ÉîÈëjava·´Éä

·´ÉäµÄ»ùʯ——ClassÀà
Java³ÌÐòÖеĸ÷¸öJavaÀàÊôÓÚͬһÀàÊÂÎÃèÊöÕâÀàÊÂÎïµÄJavaÀàÃû¾ÍÊÇClass¡£±ÈÈ磺ÖÚ¶àµÄÈË¿ÉÒÔÓÃÒ»¸öPersonÀàÀ´±íʾ£¬¶øÕâ¸öÀà¾Í¿ÉÒÔÃèÊöÈ˵ÄÐÅÏ¢(ÐÕÃû¡¢ÄêÁä¡¢ÐÔ±ðµÈµÈ)£¬¶øÖÚ¶àµÄJavaÀà¾Í¿ÉÒÔÓÃClassÀ´±íʾ¡£
   Question£ºPersonÀà´ú±íÈË£¬ËüµÄʵÀý¶ÔÏó¿ÉÒÔÊÇÕÅÈý¡¢ÀîËÄ£¬ ......

JAVAÅÅÐò»ã×Ü

import java.util.Random;
/**
 * ÅÅÐò²âÊÔÀà
 *
 * ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º
 * 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£»
 * 2.½»»»ÅÅÐò£¨Ã°ÅÝÅÝÅÅÐò¡¢¿ìËÙÅÅÐò£©£»
 * 3.Ñ¡ÔñÅÅÐò£¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò£©£»
 * 4.¹é²¢ÅÅÐò£»
 * 5.»ùÊýÅÅÐò¡£
 *
& ......

JAVAÖØдequals·½·¨


VAÎÊÌâµÄÒý³ö£º½ñÌì±àд̰³ÔÉß³ÌÐòµÄʱºòÓöµ½ÕâÑùÒ»¸öÎÊÌâ
public class Coordinate {
 public int headX, headY;
 Coordinate(int headX, int headY) {
  this.headX = headX;
  this.headY = headY;
 }
  
 public boolean equals(Coordinate c) {
 & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ