Java ðÅÝÅÅÐò
/**
* ½»»»ÅÅÐò-ðÅÝÅÅÐò£¬ºËÐÄ˼Ïë ÒÔ´óСΪÒÀ¾Ý½»»»
*
* */
public void bubbleSort(double[] a){
//½«Òª½øÐбȽϵÄÊý´óµÄ¾¡Á¿ÍùºóÅÅ£¬Ã¿´ÎÑ»·°Ñ×î´óµÄÅÅÔÚÒªÅÅÐòÊý×éµÄĩλ¡£
boolean hasSwap = true;
for(int i = 1; i < a.length&& hasSwap; i ++){//Ñ»·µÄ´ÎÊý
hasSwap = false;//¼Ç¼´Ë´Î±È½ÏÊÇ·ñ´æÔÚλÖý»»»£¬Èô²»´æÔÚÔòÖ¤Ã÷ÓàϵÄÊý×éÔªËØÒѾÅĺÃÐò¡£
for(int j = 0;j < a.length - i; j ++){//±È½Ï
if(a[j] > a[j+1]){
double temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
hasSwap = true;
}
}
}
}
JavaÅÅÐòË㷨ϵÁÐ--½»»»ÅÅÐò֮ðÅÝÅÅÐò
Ïà¹ØÎĵµ£º
//** **********´´½¨¹¤×÷²¾************ */
WritableWorkbook workbook = Workbook.createWorkbook(new File("d:/test.xls"));
/** *//** **********´´½¨¹¤ ......
ÏîÄ¿ÖÐÐèÒªºÍµÚÈý·½Æ½Ì¨½Ó¿Ú£¬¼ÓÁËÀ´Ô´IP¼øȨ¹¦ÄÜ£¬²âÊÔʱ·¢ÏÖûÓÐÎÊÌ⣬µ«ÊDz¿ÊðÒÔºó·¢ÏÖ´æÔÚÎÊÌ⣬һֱ¼øȨ²»Í¨¹ý£¬Ò»ÈºÈËץϹ¡£
ÎÒÕÒµ½ÄÇ¿éµÄ´úÂ룬¸úÁËÒ»±éÁ÷³Ì·¢ÏÖÂ߼ûÓÐɶÎÊÌ⣬µ«ÊÇ×îÖյĽá¹ûÈ´»¹ÊǼøȨ²»Í¨¹ý£¬ÊµÔÚÓÐЩ¹îÒì¡£Æä»ù±¾Â߼ΪÏÈÈ¡µÃÅäÖõÄIPÁÐ±í£¬È»ºóͨ¹ýrequest.getRemoteAddr()È¡µÃ¿Í»§¶ËµÄIPµ ......
Java×¢Ê͹淶
¶¨ÒåÕâ¸ö¹æ·¶µÄÄ¿µÄÊÇÈÃÏîÄ¿ÖÐËùÓеÄÎĵµ¶¼¿´ÆðÀ´ÏñÒ»¸öÈËдµÄ£¬Ôö¼Ó¿É¶ÁÐÔ£¬¼õÉÙÏîÄ¿×éÖÐÒòΪ»»È˶ø´øÀ´µÄËðʧ¡££¨ÕâЩ¹æ·¶²¢²»ÊÇÒ»¶¨Òª¾ø¶Ô×ñÊØ£¬µ«ÊÇÒ»¶¨ÒªÈóÌÐòÓÐÁ¼ºÃµÄ¿É¶ÁÐÔ£©¡£
Java µÄÓï·¨Óë C++ ¼°ÎªÏàËÆ£¬ÄÇô£¬ÄãÖªµÀ Java µÄ×¢ÊÍÓм¸ÖÖÂð£¿ÊÇÁ½ÖÖ£¿ ¡¡¡¡
// ×¢ÊÍÒ»ÐС¡¡¡
/* ...... */ ×¢Ê ......
½ñÍíÔÚ¹äCSDNµÄʱºò·¢ÏÖÁË£¬ÓÐÈËÓÃjavaдÁËÉú³Émyeclipse×¢²áÂëµÄ´úÂ룬ËùÒԾͳ¼ÁËÏÂÀ´¡£ o(∩_∩)o ¹þ¹þ
package gggg;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MyEclipseGen {
private static final ......
1.¶ÁÈ¡XMLÎļþµÄÀࣺ
public class XMLUtils {
private final String DB_XML_FILE = "/XMLSetting.xml";
public Properties getPropertiesfromXML() {
URL url = XMLUtils.class.getResource(dBXMLFILE);
URI uri;
try {
uri = url.toURI();
InputSource xmlfile = new InputSource(uri.g ......