java£ºËÄÔò»ìºÏÔËË㣬ģÄâ΢ÈíµÄ¼ÆËãÆ÷
package arrays.myArray;
import java.util.Scanner;
public class SortObject {
private static int intercePosition = 0; // ¼Ç¼µ¥¸öÔËËãÊý¾ÝµÄ³¤¶È
private static int[] intercePositionIndex = null; // ¼Ç¼“£¨”µÄϱê
private static int[] intercePositionEnd = null; // ¼Ç¼“£©”µÄϱê
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
do {
System.out.println("ÇëÊäÈëÄãÒª¼ÆËãµÄ×Ö·û´®(×¢Ò⣺ֻÄÜÊäÈëÊý×ֺͼӣ¬¼õ£¬³Ë³ý·ûºÅ;ÊäÈëÍê±Ïºó,ÇëÖ±½Ó»Ø³µ):");
String numberString = input.next().trim();
// ÅжÏÊäÈëµÄÔËËã×Ö·û´®ÊÇ·ñ·ûºÏ¹æ¶¨
if (ispassString(numberString) == false) {
System.out.println("ÄúÊäÈëµÄ¼ÆËã×Ö·û´®ÓÐÎó,ÇëÕýÈ·ÊäÈë!");
} else {
// ¼ÆËã½á¹û·µ»Ø
System.out.println(interceResult(numberString));
}
} while (true);
}
// ÅжÏÊÇ·ñÓдøÀ¨ºÅµÄÔËËã×Ö·û´®´æÔÚ
private static String interceResult(String str) {
String result = str;
char[] numberString = str.toCharArray(); // 1+2+(1*2+1-1*2+5)+2+(1+5+9+10-11)+1*5/2+3
// 1+8-9+(1*8/2-5+(1+2+8))+4/5*8/3*2
int IndexStart = 0; // ¼Ç¼“£¨”µÄʵ¼ÊÊýÁ¿
int EndStart = 0; // ¼Ç¼“£©”µÄʵ¼ÊÊýÁ¿
for (int i = 0; i < numberString.length; i++) {
if ('(' == numberString[i]) {
// ¼Ç¼×îºóÒ»¸öÕýÀ¨ºÅµÄλÖÃ
IndexStart = i;
}
if (')' == numberString[i]) {
// ¼Ç¼·´À¨ºÅµÄ×î³õʼϱêµÄλÖÃ
EndStart = i;
// ½ØÈ¡×îÀïÃæÒ»¸öÀ¨ºÅÀïµÄÔËËã×Ö·û´®
result = result.substring(IndexStart + 1, EndStart);
// ½ØÈ¡À¨ºÅµÄÔËË
Ïà¹ØÎĵµ£º
¹«Ë¾Óõ½´®¿Ú±à³Ì£¬¹Ê¿ªÊ¼Ñо¿£¬Ê×ÏÈËѵ½µÄÊÇjavacomm20-win32.zipÕâ¸öѹËõ°ü£¬°´ÕÕÍøÉϵݲװÅäÖúã¬ÈçÏ£º
API
ÔÚjavax.commÏÂÓÐ13¸öÀàºÍ½Ó¿Ú£¬·Ö±ðÊÇ
4¸ö½Ó¿Ú
CommDriver ¿É¸ºÔØÉ豸£¨the loadable device£©Çý¶¯³ ......
¼øÓÚÍøÉÏËѵ½µÄ¶¼ÊÇ»ùÓÚjdk1.4»òÒÔÇ°°æ±¾£¬¶øÇÒ±¾µØ¿âÓõÄÊÇCÓïÑÔ¡£¶øÏÖÔÚÊÇ»ùÓÚC++£¬ËùÒÔ¸üмǼÈçÏ£º
µÚÒ»²½£º´´½¨JavaÔ´ÂëÎļþ
public class Hello{
static{
System.loa ......
Êý¾Ý¿âÁ¬½Ó³Ø£¬ÊÇÒ»ÖÖÏ൱ʵÓõÄÓ¦ÓóÌÐò¡£Ëü¿ÉÒÔ±£´æ¡¢Î¬»¤¼°´´½¨Óû§ËùÐèµÄÊý¾Ý¿âÁ¬½Ó¡£´Ó¶øʹµÃÓû§µÃµ½Ò»¸öÁ¬½ÓµÄʱ¼ä½µµÍ90%ÒÔÉÏ¡£´ó´óÌáÉýÁËÊý¾Ý¿â·ÃÎʵķ´Ó¦Ê±¼ä¡£
Õâ¸öÊÇÒ»¸ö¿ªÔ´µÄ´úÂë¡£´ó¼Ò¿ÉÒÔÐÞ¸ÄËü¡¢Ê¹ÓÃËü¡£
Ï£ÍûÎҵĴúÂëÄܶԴó¼ÒÓÐÓá£
´Ë´úÂ룬¾¹ý1000ÊýÁ¿¼¶µÄ¶àÏ̲߳¢·¢·ÃÎʲâÊÔ¡£ÔÚËĺËCPUÏÂÒ²½øÐÐ ......
public class Split{
public static void main(String[] args){
double pai = 3.14159;
findTwo(pai);
public static void findTwo(double value){
System.out.println(new DecimalFormat("0.##"). ......
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) ......