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

ÓÃJAVAʵÏÖ¶ÑÕ»£¨Á´±íƪ£©

ʲôÊǶÑÕ»£¬¹ØÓÚÕâ¸öÃû´Ê£¬ÎÒÔڰٶȣ¬googleËÑË÷ÁË°ëÌ죬ҲûÓз¢ÏÖÒ»¸ö±È½ÏȨÍþµÄ½âÊÍ£¬»¹ÓÐÐí¶à×ÊÁÏÓïÑɲ»Ï꣬¾ÍÒÔά»ù°Ù¿ÆµÄ½âÊÍΪ׼°É£¬ºÍÎÒ¼ÇÒäÖеÄÒ»Ö¡£
¶ÑÕ»£¨Ó¢ÎÄ£ºstack£©£¬Öйú´ó½×÷¶ÑÕ»£¬Ì¨Íå×÷¶Ñµþ£¬ÔÚ¼ÆËã»ú¿Æ學ÖУ¬ÊÇÒ»種ÌØÊâµÄ´®ÁÐÐÎʽµÄ資ÁÏ結構£¬ËüµÄÌØÊâÖ®處ÔÚì¶Ö»ÄÜÔÊ許ÔÚ鏈結´®Áлò陣ÁеÄÒ»¶Ë£¨稱為¶Ñ疊頂¶ËÖ¸標£¬Ó¢ÎÄ為top£©進ÐмÓÈë資ÁÏ£¨push£©ºÍ輸³ö資ÁÏ£¨pop£©µÄ運Ëã¡£ÁíÍâ¶Ñ疊Ò²¿ÉÒÔÓÃÒ»維陣Áлò連結´®ÁеÄÐÎʽ來Íê³É¡£¶Ñ疊µÄÁíÍâÒ»個Ïà對µÄ²Ù×÷·½Ê½稱為佇ÁС£
ÓÉ춶Ñ疊資ÁÏ結構Ö»ÔÊ許ÔÚÒ»¶Ë進ÐвÙ×÷£¬Òò¶ø°´ÕÕáá進Ïȳö£¨LIFO, Last In First Out£©µÄÔ­Àí運×÷¡£
¶Ñ疊資ÁÏ結構ʹÓÃ兩種»ù±¾²Ù×÷£ºÍÆÈ루push£©ºÍ彈³ö£¨pop£©£º
ÍÆÈ루push£© £º將數據·ÅÈë¶Ñ疊µÄ頂¶Ë£¨陣ÁÐÐÎʽ»ò´®ÁÐÐÎʽ£©£¬¶Ñ疊頂¶ËtopÖ¸標¼ÓÒ»¡£
彈³ö£¨pop£©  £º將頂¶Ë數據資ÁÏ輸³ö£¨»Ø傳£©£¬¶Ñ疊頂¶Ë資ÁÏ減Ò»¡£
ÏÂÃæÊÇÓÃjava Á´±í ʵÏÖ¶ÑÕ»
/**
* ±íʾÁ´±íµÄÒ»¸ö½Úµã
* @author Adair
*/
public class Node{
Object element;
Node next;

public Node(Object element) {
this(element, null);
}
public Node(Object element, Node n) {
this.element = element;
next = n;
}
public Object getElement() {
return element;
}
public void setElement(Object element) {
this.element = element;
}
public Node getNext() {
return next;
}
public void setNext(Node next) {
this.next = next;
}
}
/**
* ÓÃÁ´±íʵÏÖ¶ÑÕ»
* @author Adair
*/
public class ListStack
{
Node header; //Õ»¶¥ÔªËØ
int elementCount;// Õ»ÄÚÔªËظöÊý
int size;// Õ»µÄ´óС
/**
* ¹¹Ô캯Êý£¬¹¹ÔìÒ»¸ö¿ÕµÄ¶ÑÕ»
*/
public ListStack()
{
header = null;
elem


Ïà¹ØÎĵµ£º

JNAʵÏÖJavaµ÷ÓÃFortran

Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......

Java:ÖØдequals()ºÍhashCode()

1.
ºÎʱÐèÒªÖØд
equals()
µ±Ò»¸öÀàÓÐ×Ô¼ºÌØÓеēÂß¼­ÏàµÈ”¸ÅÄ²»Í¬ÓÚ¶ÔÏóÉí·ÝµÄ¸ÅÄ¡£
2.
Éè¼Æ
equals()
[1]
ʹÓÃ
instanceof
²Ù×÷·û¼ì²é“ʵ²ÎÊÇ·ñΪÕýÈ·µÄÀàÐÍ”¡£
[2]
¶ÔÓÚÀàÖеÄÿһ¸ö“¹Ø¼üÓò”£¬¼ì²éʵ²ÎÖеÄÓòÓ뵱ǰ¶ÔÏóÖжÔÓ¦µÄÓòÖµ¡£
[2.1]
¶ÔÓÚ·Ç
float
ºÍ ......

Java´Ó¿ØÖÆ̨ÖжÁÈ¡Êý¾ÝÍêÈ«¹¥ÂÔ

0¡¡ÒýÑÔ
   
´Ó¿ØÖÆ̨ÖжÁÈ¡Êý¾ÝÊÇÒ»¸ö±È½Ï³£ÓõŦÄÜ£¬ÔÚ JDK 5.0 ÒÔÇ°µÄ°æ±¾ÖеÄʵÏÖÊDZȽϸ´Ôӵģ¬ÐèÒªÊÖ¹¤´¦ÀíϵͳµÄÊäÈëÁ÷¡£ÓÐÒâ˼µÄÊÇ£¬´Ó JDK 5.0 °æ±¾¿ªÊ¼£¬ÄÜ´Ó¿ØÖÆ̨ÖÐÊäÈëÊý¾ÝµÄ·½·¨Ã¿Ôö¼ÓÒ»¸ö°æ±¾ºÅ£¬¾ÍÓÐÒ»ÖÖÐÂÔöµÄ·½·¨£¬ÕâÒ²Ôö¼ÓÁËÑ¡ÔñµÄÖÖÀ࣬¿ÉÒÔÒÀ¾Ý²»Í¬µÄÒªÇóÀ´½øÐÐÑ¡Ôñ¡£ÏÂÃæÀ´¿´Ò»Ï ......

JAVA LIST ±éÀú

¶ÔListµÄ±éÀúÓÐÈýÖÖ·½Ê½  
   
   List<A>    list    =    new    ArrayList<A>();  
   list.add(new    A());  
   list.add(new & ......

JavaỊ̈߳º²¢·¢Ð­×÷ Éú²úÕßÏû·ÑÕßÄ£ÐÍ

¶ÔÓÚ¶àÏ̳߳ÌÐòÀ´Ëµ£¬²»¹ÜÈκαà³ÌÓïÑÔ£¬Éú²úÕߺÍÏû·ÑÕßÄ£ÐͶ¼ÊÇ×î¾­µäµÄ¡£¾ÍÏñѧϰÿһÃűà³ÌÓïÑÔÒ»Ñù£¬Hello World!¶¼ÊÇ×î¾­µäµÄÀý×Ó¡£
¡¡¡¡Êµ¼ÊÉÏ£¬×¼È·ËµÓ¦¸ÃÊÇ“Éú²úÕß-Ïû·ÑÕß-²Ö´¢”Ä£ÐÍ£¬À뿪Á˲ִ¢£¬Éú²úÕßÏû·ÑÕßÄ£Ð;ÍÏÔµÃûÓÐ˵·þÁ¦ÁË¡£
¡¡¡¡¶ÔÓÚ´ËÄ£ÐÍ£¬Ó¦¸ÃÃ÷ȷһϼ¸µã£º
¡¡¡¡1¡¢Éú²úÕß½ö½öÔÚ²Ö´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ