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

JAVA³£ÓòÙ×÷Óï¾ä ÏîÄ¿ÖеÄ×ܽáÎå


Êý×ֵĸñʽ»¯
DecimalFormat df = new DecimalFormat(",###.00");  
double aNumber = 33665448856.6568975; 
String result = df.format(aNumber);  
Sytem. out.println(result);

Êä³ö½á¹ûΪ£º
33,665,448,856.66 
·ÖÎö×Ö·û´® 
StringTokenizer(String s) ¹¹ÔìÒ»¸ö·ÖÎöÆ÷£¬Ê¹ÓÃĬÈÏ·Ö¸ô×Ö·û£¨¿Õ¸ñ£¬»»ÐУ¬»Ø³µ£¬Tab£¬½øÖ½·û£© 
StringTokenizer(String s,String delim) delimÊÇ×Ô¼º¶¨ÒåµÄ·Ö¸ô·û 
nextToken() Öð¸ö»ñÈ¡×Ö·û´®ÖеÄÓïÑÔ·ûºÅ 
boolean hasMoreTokens() Ö»Òª×Ö·û´®»¹ÓÐÓïÑÔ·ûºÅ½«·µ»Øtrue£¬·ñÔò·µ»Øfalse 
countTokens() µÃµ½Ò»¹²ÓжàÉÙ¸öÓïÑÔ·ûºÅ
Êý×éµÄÑ¡ÔñÅÅÐò
public void ListNum(int[] a){  
  for(int k=0;k<a.length-1;k++){
  int j=k;  
  int mini=a[k];
  for(int i=k+1;i<a.length;i++){  
  if(a[k]>a[i]){
  a[k]=a[i];  
  j=i;
  }  
  }
  a[j]=mini;  
  }  
}
MD5ºÍÒ»¸ö¿ÉÄæ¼ÓÃÜËã·¨Ïà½ÓºÏµÄ¼ÓÃܺͽâÃܳÌÐò
import java.security.MessageDigest;
/**
*ÏÈͨ¹ýMD5¼ÓÃÜÖ®ºó£¬ÔÙÀ´Ò»´Î¿ÉÄæµÄ¼ÓÃÜ¡£
*˳Ðò¿ÉÒÔµ÷Õû£¬¿ÉÒÔÑ¡ÔñÏÈÓÿÉÄæ¼ÓÃÜ£¬È»ºóÔÙÓÃMD5¼ÓÃÜ
*/
public class MD5andKL{
//MD5¼ÓÂë¡£32λ
public static String MD5(String inStr) {
MessageDigest md5 = null;
try {
md5 = MessageDigest.getInstance("MD5");
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
return "";
}
char[] charArray = inStr.toCharArray();
byte[] byteArray = new byte[charArray.length];

for (int i = 0; i < charArray.length; i++)
byteArray[i] = (byte) charArray[i];

byte[] md5Bytes = md5.digest(byteArray);

StringBuffer hexValue = new StringBuffer();



Ïà¹ØÎĵµ£º

JavaµÄ´úÀíģʽÀý×Ó

(1).  ´´½¨Ò»¸ö½Ó¿Ú, Òª´úÀíµÄÀàºÍ ´úÀíÀ඼½«¼Ì³ÐËü
package stone;
public interface Image {
    public void show();
}
(2). ´´½¨Òª±»´úÀíµÄÀà:
package stone;
public class BigImage implements Image {
    public BigImage() {
        ......

»ùÓÚJavaµÄÈ«ÎļìË÷ÒýÇæ¼ò½é


LuceneÊÇÒ»¸ö»ùÓÚJavaµÄÈ«ÎÄË÷Òý¹¤¾ß°ü¡£
»ùÓÚJavaµÄÈ«ÎÄË÷ÒýÒýÇæLucene¼ò½é£º¹ØÓÚ×÷ÕߺÍLuceneµÄÀúÊ·
È«ÎļìË÷µÄʵÏÖ£ºLueneÈ«ÎÄË÷ÒýºÍÊý¾Ý¿âË÷ÒýµÄ±È½Ï
ÖÐÎÄÇзִʻúÖƼò½é£º»ùÓÚ´Ê¿âºÍ×Ô¶¯ÇзִÊËã·¨µÄ±È½Ï
¾ßÌåµÄ°²×°ºÍʹÓüò½é£ºÏµÍ³½á¹¹½éÉܺÍÑÝʾ
Hacking Lucene£º¼ò»¯µÄ²éѯ·ÖÎöÆ÷£¬É¾³ýµÄʵÏÖ£¬¶¨ÖƵÄÅÅÐò£ ......

JAVA »ñÈ¡±¾ÖܵÄÆðʼÈÕÆÚ troy

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * @author troy(J2EE)
 * @version 1.0
 */
public class Test {
 public static void main(String[] args) throws Exception {
  DateFormat df = DateFormat.getDateInstance();
 &n ......

javaÕýÔò±í´ïʽѧϰ

1.×Ö·û
x    ×Ö·û x¡£ÀýÈça±íʾ×Ö·ûa
\\    ·´Ð±Ïß×Ö·û¡£ÔÚÊéдʱҪдΪ\\\\¡££¨×¢Ò⣺ÒòΪjavaÔÚµÚÒ»´Î½âÎöʱ,°Ñ\\\\½âÎö³ÉÕýÔò±í´ïʽ\\£¬ÔÚµÚ¶þ´Î½âÎöʱÔÙ½âÎöΪ\£¬ËùÒÔ·²ÊDz»ÊÇ1.1Áоٵ½µÄתÒå×Ö·û£¬°üÀ¨1.1µÄ\\,¶øÓÖ´øÓÐ\µÄ¶¼ÒªÐ´Á½´Î£©
\0n    ´øÓа˽øÖÆÖµ 0µÄ×Ö·û ......

REST¼Ü¹¹ÓëJavaʵÏÖ1——REST¸ÅÄî

ÓÉÓÚÓиöºÏ×÷ÏîÄ¿£¬Óõ½ÁËREST£¬ÎÒÃÇÕâ±ßµÄ·þÎñÆ÷ÊÇjavaµÄ£¬ºÏ×÷·½ÄDZßÖ÷ÒªÊÇPHP»·¾³£¬ÎªÁËÔ¶³Ìµ÷ÓõÄÎÊÌ⣬ʹÓÃÁËREST×÷ΪAPIµÄʵÏÖ·½
°¸¡£ÏÖÔÚÏîÄ¿×öµÃ²î²»¶àÁË£¬ÏÂÃæ¼ÇÏÂ×Ô¼ºµÄÒ»µãÐĵã¬ËãÊDZʼǰɡ£
    REST£¨Representational State Transfer£©µÄ˵·¨À´×Ô“Architectural Styles and the Desi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ