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

¼¸ÖÖ³£¼ûµÄÊý¾Ý½á¹¹µÄJAVAʵÏÖ

Ê÷ÊÇÒ»¸öµÝ¹éµÄÊý¾Ý½á¹¹£¬Ò»¿ÃÊ÷ÉϵÄËùÓнڵ㶼¿ÉÒÔ±»¿´³ÉÊÇÒ»¿ÃÊ÷£¬Ö»²»¹ý³ý¸ù½ÚµãÍâÆäËû½Úµã¶¼±È×ÜÊ÷µÄ¹æÄ£Ð¡µã¶øÒÑ¡£Ê÷µÄ½ÚµãÓÐÈýÖÖ£º¸ù½Úµã£¨Ã»Óи¸Ç׽ڵ㣩£¬Ò¶×ӽڵ㣨ûÓк¢×ӽڵ㣩£¬Ò»°ã½Úµã£¨¼ÈÓи¸Ç׽ڵ㣬ҲÓк¢×ӽڵ㣩¡£¾ßÌå¶Ô½á¹¹µÄ·ÖÎö£¬¼¸ºõËùÓÐдÊý¾Ý½á¹¹µÄÊéÖж¼ÓÐÌáµ½¡£
Õâ¿ÃÊ÷µÄʵÏÖ»¨Á˺ü¸Ììʱ¼ä£¬Åöµ½µÄ×î´óÎÊÌâÊÇJAVAµÄ·ºÐÍ£¬ÔÚ¶Ô·ºÐͲ»ÊÇ×ã¹»Á˽âµÄÊÂʵÏ£¬Ëƺõµ½´¦¶¼Åöµ½ÏÝÚ壬ÐÒ¿÷ÔÚÕâÖмäµÃµ½ÁËÖÜÊ÷Ⱥͬ־µÄ¶¦Á¦ÏàÖú£¬ËùÒÔÔÚÕâÀï±íÑïËûÀÏÈ˼ÒÒ»°Ñ£ºÖÜÊ÷ȺÊǸöºÃͬ־£¡
²»¹ÜÔõô˵£¬Ò»¿Ã¼òµ¥µÄÊ÷ÒѾ­ÊµÏÖÁË£¬ÒÔºóÒªÓõ½Ê÷µÄµØ·½¾Í·½±ã¶àÁË£¨Ä¿Ç°ÎªÖ¹ÎÒ»¹Ã»¿´µ½JDKÀïÓÐרÃŵÄÊ÷µÄʵÏÖ£©¡£ÏÂÃæÊÇÕâ¿ÃÊ÷µÄ½Ó¿ÚITree£¬ÒÔ¼°¾ßÌåʵÏÖÀàOriginalTree¡£
ITree:
package utility.structure.def;
import java.util.Collection;
import java.util.List;
/**
*
* @author odie.tang
*
* @version 1.0 10/30/09
*/
public interface ITree<E>{

E getData();

void set(E e);

E remove();

int getDepth();

int getLevel();

ITree<E> getParent();

ITree<E> getFirstChild();

ITree<E> getLastChild();

ITree<E> addChild(int childIndex,E e);

void addChildren(Collection<? extends E> children);

void addChildren(int childIndex, Collection<? extends E> children);

ITree<E> addChild(E e);

ITree<E> getChild(int childIndex);

E removeChild(int childIndex);

List<ITree<E>> getChildren();

boolean isLeaf();

boolean isRoot();

ITree<E> getRoot();

boolean remove(E e);

ITree<E> getNode(E e);

}

OriginalTree:
package utility.structure;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.List;
import java.util.NoSuchElementException;
import utility.structure.def.ITree;
/**
* @author odie.tang
* @version 1.0 , 10/30/09
*/
public class OriginalTree<E> implements ITree<E>,Serializable {
private static final long serialVersionUID =


Ïà¹ØÎĵµ£º

Java»ù±¾Óï·¨

 finalize·½·¨
ËüÊÇjava.lang.ObjectÀàÖеķ½·¨. ÊÇprotectedµÄ.
ȱʡʱÕâ¸ö·½·¨ÊǿյÄ. JavaÔËÐÐϵͳÔÚÀ¬»ø»ØÊÕʱÔÚ¶ÔÏó±»³·Ïú֮ǰµ÷ÓÃÕâ¸ö·½·¨. µ«ÓÉÓÚÀ¬»øµ¥Ôª
»ØÊÕµÄʱ¼äÊDz»È·¶¨µÄ.ËùÒÔ²»Äܹý·ÖÒÀÀµËü(ÕâºÍc++µÄÎö¹¹º¯Êý²»Í¬). 
¶øÖ»ÄÜÊÇ"ÔÚ¶ÔÏó±»³·Ïú֮ǰ"×öһЩ´¦Àí.ÀýÈç¿ÉÒÔÔÚÕâÀï¹Ø±Õ¹¹Ôì·½·¨Öдò¿ ......

javaºÍC++µÄÓï·¨Çø±ð—1

C++ÓëJavaµÄÓï·¨Çø±ð
Ê×ÏÈ£¬Á½¸ö´óµÄ²»Í¬ÊÇÖ÷º¯ÊýºÍÔõÑù±àÒëµÄ²»Í¬£¬½ÓÏÂÀ´ÊÇÐí¶àСµÄÇø±ð¡£
main º¯Êý
C++
//×ÔÓɸ¡¶¯µÄº¯Êý
int main( int argc, char* argv[])
{
    printf( "Hello, world" );
}
Java
// ÿ¸öº¯Êý¶¼±ØÐëÊÇÒ»¸öÀàµÄÒ»²¿·Ö;µ±java <class>ÔËÐÐÊÇÒ»¸öÌØ¶¨ÀàµÄÖ÷º¯Êý»á±»µ÷ ......

Java¶àÏ̱߳à³ÌÏê½â

Ò»£ºÀí½â¶àÏß³Ì
¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆÎªÒ»¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£
Ïß³ÌÓÖ³ÆÎªÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖÐµÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅÔ¶½Ï½ø³Ì¼òµ¥¡£ ......

java»·¾³ÅäÖÃ

cmd
set path=javacËùÔÚÎļþ¼Ð£¨²»°üÀ¨javac)
ÔÚÈÎÒâÎļþ¼ÐÏÂÖ±½ÓʹÓÃjavac.exe,µ«µ±cmd ¹Ø±Õʱ£¬¾Í²»ÔÙÆð×÷ÓÃ
set classpath=...
×÷ÓÃ:ÔÚÈÎÒâÎļþ¼ÐÏÂÖ±½ÓʹÓÃ.classÎļþ£¬µ«µ±cmd ¹Ø±Õʱ£¬¾Í²»ÈðÆð×÷ÓÃ
²é¿´£ºset pathh; set classpath
ÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿ÉèÖÃ
Óû§±äÁ¿£º
±äÁ¿Ãû£ºclasspat ......

[ת]Java »ñÈ¡µ±Ç°Â·¾¶&System.getProperty()²ÎÊý´óÈ«

1¡¢ÀûÓÃSystem.getProperty()º¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
System.out.println(System.getProperty("user.dir"));//user.dirÖ¸¶¨Á˵±Ç°µÄ·¾¶
2¡¢Ê¹ÓÃFileÌṩµÄº¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
File directory = new File("");//É趨Ϊµ±Ç°Îļþ¼Ð
try{
    System.out.println(directory.getCanonicalPa ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ