java£ºÊÖдMyLinkedListËùÓз½·¨£¬Ôöɾ¸Ä²é
package arrays.myArray;
public class MyLinkedList {
private int size = 0;
private Node1 head = null;
// Ìí¼Ó
public void add(Object obj) {
add(size, obj);
}
// ÐÞ¸Ä
public void add(int index, Object obj) {
if (null == head) {
head = new Node1(obj, null);
} else {
if (0 == index) {
head = new Node1(obj, head);
} else {
Node1 temp = head;
for (int i = 0; i < index - 1; i++) {
temp = temp.next;
}
temp.next = new Node1(obj, temp.next);
}
}
size++;
}
// ÒÆ³ý
public void remove(int index) {
if (0 == index) {
head = head.next;
} else {
Node1 temp = head;
for (int i = 0; i < index - 1; i++) {
temp = temp.next;
}
temp.next = temp.next.next;
}
size--;
}
// ²éѯ
public Object get(int index) {
Node1 temp = head;
for (int i = 0; i < index; i++) {
temp = temp.next;
}
return temp.obj;
}
// ×ܳ¤¶È
public int size() {
return size;
}
}
class Node1 {
Object obj;
Node1 next;
public Node1(Object obj, Node1 next) {
this.obj = obj;
this.next = next;
}
}
Ïà¹ØÎĵµ£º
Èí¼þÃû³Æ£ºÍ¼Êé¹ÜÀí¹¤¾ß
×ÜÌåÉè¼Æ£º
1.
ÃüÁîÐвÙ×÷·½Ê½
2.
»¶ÓÒ³Ãæ
---welcome to visit
software of book
management
Now is ...
& ......
ÔٴδÓÍøÉϲéѯ£¬Ëѵ½ÁËRXTXcomm.jar°ü±È½ÏºÃ£¬ÊÇ·â×°ÁËcomm.jarµÄ·½·¨¡£
°²×°£º
1.copy rxtxSerial.dll to [JDK-directory]\jre\bin\rxtxSerial.dll
2.copy RXTXcomm.jar to [JDK-directory]\jre\lib\ext\RXTXcomm.jar
&nbs ......
package com.njty.util;
public class Test {
private static final double EARTH_RADIUS = 6378137;
private static double rad(double d)
{
return d * Math.PI / 180.0;
}
  ......
£¨Ò»£©Ïß³Ìͬ²½
ʵÏÖÉú²úÕßÏû·ÑÕßÎÊÌâÀ´ËµÃ÷Ïß³ÌÎÊÌâ,¾ÙÀýÈçÏÂËùʾ:
/**
* Éú²úÕßÏû·ÑÕßÎÊÌâ
*/
public class ProducerConsumer {
/**
* Ö÷·½·¨
*/
public static void main(String[] args) {
ProductBox pb = new ProductBox ......
Jakarta-OROÕýÔò±í´ïʽ¿â
1£®¼ò½é£º
Jakarta-OROÊÇ×îÈ«ÃæÒÔ¼°ÓÅ»¯µÃ×îºÃµÄÕýÔò±í´ïʽAPIÖ®Ò»£¬Jakarta-ORO¿âÒÔǰ½Ð×öOROMatcher£¬ÊÇÓÉDaniel F. Savarese±àд£¬ºóÀ´Ëû½«ÆäÔùÓëJakarta Project£¬¶ÁÕß¿ÉÔÚApache.orgµÄÍøÕ¾ ÏÂÔØ¸ÃAPI°ü¡£
Ðí¶àÔ´´úÂ뿪·ÅµÄÕýÔò±í´ïʽ¿â¶¼ÊÇÖ§³ÖPerl5¼æÈݵÄÕýÔò±í´ïʽÓï·¨£¬Jakarta-OROÕýÔ ......