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

JavaÖÐÓйØbyteºÍStringµÄת»»±Ê¼Ç

¹Ø¼ü×Ö: byte String
ÎÊÌâ1£ºjavaÖÐûÓÐʵÏÖÕâÖÖ“byte a = 0xB2 --> String b = “B2””ת»»µÄ¼òµ¥ÊµÏÖÐèÒª×Ô¼ºÊµÏÖ¡£
´ð£º×Ô¼º±àдµÄת»»º¯Êý£¬Ë¼Â·½«byteµÄ¸ßµÍ4λ·Ö¿ª£¬·Ö±ðת»»Îª¶ÔÓ¦µÄ×Ö·ûÈ»ºóºÏ³É·µ»ØµÄ×Ö·û´®¡£
java ´úÂë
public static String byteToString(byte b) {   
byte high, low;   
byte maskHigh = (byte)0xf0;   
byte maskLow = 0x0f;   
  
high = (byte)((b & maskHigh) >> 4);   
low = (byte)(b & maskLow);   
  
StringBuffer buf = new StringBuffer();   
buf.append(findHex(high));   
buf.append(findHex(low));   
  
return buf.toString();   
}   
  
private static char findHex(byte b) {   
int t = new Byte(b).intValue();   
t = t < 0 ? t + 16 : t;   
  
if ((0 <= t) &&(t <= 9)) {   
return (char)(t + '0');   
}   
  
return (char)(t-10+'A');   
}   
  
δ½â¾öµÄÒÉÎÊÔÚjavaÖв»´æÔÚÀàËÆCÖеÄÎÞ·ûºÅÁ¿£¬ËùÒÔÈç¹ûÒ»¸ö×Ö½Ú³¬¹ý0x80Æä¶ÔÓ¦µÄÕûÐÍÖµ¼´Îª¸ºÖµ£¬µ«ÔÚ¸ßλÓÒÒÆ4λºó»¹ÊǸºÖµ£¬ÇÒÓë¶ÔÓ¦µÄÕýÖµÏà²î16£¬±ÈÈç0xB2¾­¹ýÓÒÒƺóµÄÆÚÍûÖµÊÇ0x0B£¨11£©µ«Êµ¼ÊÖµÊÇ£­5ÓëÔ¤ÆÚµÄÖµÏà²î16£¨Õâ¸ö16ͨ¹ý¶à´ÎÊÔÑéµÃ³ö£©£¬¶Ô´ËÏÖÏóΪÕÒµ½ºÏÀíµÄ½âÊÍ¡£
ÎÊÌâ2£º“String a=”B2” --> byte b=0xB2”×Ö·ûµÄbyteת»»ÎªbyteÊý¾ÝÀàÐÍ
´ð£ºË¼Â·Í¨¹ýInteger×÷Ϊת»»µÄÖмäÇÅÁº
java ´úÂë
public static int stringToByte(String in, byte[] b) throws Exception {   
if (b.length < in.length() / 2) {   
throw new Exception("byte array too small");   
}   
  
int j=0;   
StringBuffer buf = new StringBuffer(2);   
for (int i=0; i
buf.insert(0, in.charAt(i));   
buf.insert(1, in.charAt(i+1));   
int t = Integer.parseInt(buf.toString(),16);


Ïà¹ØÎĵµ£º

JAVA´úÂë¹æ·¶


ÖØÒªÐÔ
¼ì²éÏî
ÖØÒª
ÃüÃû¹æÔòÊÇ·ñÓëËù²ÉÓõĹ淶±£³ÖÒ»Ö£¿
¡¡
ÊÇ·ñ×ñÑ­ÁË×îС³¤¶È×î¶àÐÅÏ¢Ô­Ôò£¿
ÖØÒª
has/can/isǰ׺µÄº¯ÊýÊÇ·ñ·µ»Ø²¼¶ûÐÍ£¿
×¢ÊÍ
¡¡
ÖØÒª
×¢ÊÍÊÇ·ñ½ÏÇåÎúÇÒ±ØÒª£¿
ÖØÒª
¸´ÔӵķÖÖ§Á÷³ÌÊÇ·ñÒѾ­±»×¢ÊÍ£¿
¡¡
¾àÀë½ÏÔ¶µÄ}ÊÇ·ñÒѾ­±»×¢ÊÍ£¿
¡¡
·ÇͨÓñäÁ¿ÊÇ·ñÈ«²¿±»×¢ÊÍ£¿
ÖØÒª
º¯ÊýÊÇ· ......

java¶ÁÈ¡ExcelÎļþ

http://www.andykhan.com/jexcelapi/¿ÉÒÔÏÂÔص½µÚÈý·½jxl.jar°ü£¬²¢ÇÒexcelÒª±£´æΪ2003»òÒÔÇ°µÄ°æ±¾
package com.excel;
// 1 Îļþ¶ÔÏó 2¹¤×÷²¾¶ÔÏó 3 µ¥Ôª¸ñ¶ÔÏó¡£
//ÏàÓ¦µÄÔÚJXLÖоÍÓÐWorkbook£¬Sheet £¬Cell ¡£
import java.io.*;
import jxl.*;
public class GetExcelValues3 {
public static void main(Strin ......

JAVA ѧϰ֮µÀ

      ÏÖÔÚÒѾ­¿ªÊ¼Ñ§Ï°javaÒ»¸öÔÂ×óÓÒµÄʱ¼äÁË¡£ÒÔÇ°¶ÔjavaÓÐһЩ»ù±¾µÄÁ˽⣬ ÔÚÇ°¼¸¸öÔµÄʱ¼äµ±ÖУ¬Ñ§Ï°ÁË.netµÄ¼¼Êõ£¬¶ÔÃæÏò¶ÔÏóµÄÉè¼ÆÓÐÁ˸üÉîµÄÒ»¸öÈÏʶ£¬ÔÚÒ»¸öżȻµÄ¹¤×÷»ú»áÉÏ£¬½á½»ÁËÒ»¸öÅóÓÑ¡£ËûÎÊÎÒÏëÔÚÄÄÒ»·½Ïò·¢Õ¹£¬ÆäʵÎÒÒ²²»Çå³þ£¬Ëû˵Ҫ×Ô¼º¶¨ºÃÒ»¸öλ£¬È»ºóÕâÑùÕÕ׿ƻ®×ßÏÂÈ¥ ......

JAVA¹æ·¶Ñ§Ï°——³ÌÐòÖ´ÐÐʱµÄÀà¼ÓÔزÙ×÷

³ÌÐòÖ´ÐÐʱ»á˳Ðò¾­¹ýloading¡¢linking¡¢initializationÈý¸ö²½Öè
1. loading£º²éÕÒÀà»ò½Ó¿ÚµÄ¶þ½øÖÆÎļþ
2. linking£º×°ÈëÀà»ò½Ó¿ÚµÄ¶þ½øÖÆÎļþ£¬ºÏΪJVMµÄÔËÐÐ״̬£¬Ê¹Æä¿ÉÒÔ±»Ö´ÐС£´Ë¹ý³Ì°üÀ¨Èý¸ö×Ó¹ý³Ì£ºverification, preparation, and
    resolution of symbolic references
3. initialization£º ......

Java ¶àÏß³Ì

1. ´´½¨Ị̈߳¨¼Ì³ÐThreadºÍʵÏÖrunnable½Ó¿Ú£© class SubThread {
private class InnerThread extends Thread {
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
super.run();
}
}
public Thread getThread() {
return new InnerThread();
}
}
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ