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

java×°ÏäÓë²ðÏä

/**
* ==ºÅÊDZȽÏÁ½¸ö»ù±¾ÀàÐÍÊÇ·ñÏàµÈ,»òÕ߱ȽÏÁ½¸ö¶ÔÏóÒýÓÃÊÇ·ñÏàͬ
*/
public class T {

public static void main(String[] args) {
Integer i1 = 128;
Integer i2 = 128;
int i3 = 128;
int i4 = 128;
Integer i5 = 127;
Integer i6 = 127;

Long long1 = 128L;
Long long2 = 128L;
long long3 = 128L;
long long4 = 128L;
long long5 = -128L;
long long6 = -128L;

//-128 ~ 127Ö®¼äÊýÖµ×°Ïäʱ»á¹²ÏíÄڴ渱±¾, ³¬¹ýÕâ¸ö·¶Î§£¬Ôò²»»á¹²ÏíÒýÓ㬼´¶ÔÏóµØÖ·½«²»Í¬

System.out.println(i1 == i2); //ʵÖÊÊDZȽÏÁ½¸ö²»Í¬ÒýÓà false
System.out.println(i5 == i6); //ʵÖÊÊDZȽÏÁ½¸öÏàͬ£¨¹²Ïí£©ÒýÓÃtrue
System.out.println(i1 == i3); //ÏȽ«i1²ðÏ䣬Ȼºó±È½Ï»ù±¾ÀàÐÍ true
System.out.println(i1.equals(i4)); //ÏȽ«i4×°Ï䣬Ȼºó±È½Ï»ù±¾ÀàÐÍ true

System.out.println(long1 == long2);//Á½¸öÒýÓò»Í¬ false
System.out.println(long5 == long6);//¹²Óø±±¾ true
System.out.println(long1 == long3);//long1ÏȲðÏ䣬 ÔÚ±È½Ï true
System.out.println(long2.equals(long4));//long4ÏÈ×°Ïä, ÔÙequals, true
}
}


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

java²Ù×÷oracleÊý¾Ý¿âÖеÄblob×Ö¶Î

oracleÖеÄBLOB×Ö¶ÎÊÇ´æ´¢2½øÖƵÄÎļþ£¬±ÈÈçÎļþ£¬Í¼Æ¬µÈ¡£
1¡¢°Ñ±¾µØÎļþдÈëÊý¾Ý¿â
package com.data;
import java.io.File;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.R ......

Java×Ö½ÚÐò

¡¡ÒÔ϶ÔBIG-ENDIAN¡¢LITTLE-ENDIANµÄ½âÊÍÕýºÃŪ·´ÁË£¡£¡£¡£¡
¡¡¡¡BIG-ENDIAN£¨´ó×Ö½ÚÐò¡¢¸ß×Ö½ÚÐò£©
¡¡¡¡LITTLE-ENDIAN£¨Ð¡×Ö½ÚÐò¡¢µÍ×Ö½ÚÐò£©
¡¡¡¡Ö÷»ú×Ö½ÚÐò
¡¡¡¡ÍøÂç×Ö½Ú˳Ðò
¡¡¡¡JAVA×Ö½ÚÐò
¡¡¡¡1£®BIG-ENDIAN¡¢LITTLE-ENDIAN¸ú¶à×Ö½ÚÀàÐ͵ÄÊý¾ÝÓйصıÈÈçint,short,longÐÍ£¬¶ø¶Ôµ¥×Ö½ÚÊý¾ÝbyteȴûÓÐÓ°Ïì¡£BIG- ......

Javaѧϰ±Ê¼Ç¢Ü javaÐÞÊδÊ×ܽá


 
 
JavaÓïÑÔ¶¨ÒåÁËpublic¡¢protected¡¢private¡¢abstract¡¢staticºÍfinalÕâ6ÖÖ³£ÓÃÐÞÊδÊÍ⻹¶¨ÒåÁË5¸ö²»Ì«³£ÓõÄÐÞÊδʣ¬ÏÂÃæÊǶÔÕâ11¸öJavaÐÞÊδʵĽéÉÜ£º
1.public
ʹÓöÔÏó£ºÀà¡¢½Ó¿Ú¡¢³ÉÔ±
½éÉÜ£ºÎÞÂÛËüËù´¦Ôڵİü¶¨ÒåÔÚÄÄ£¬¸ÃÀࣨ½Ó¿Ú¡¢³ÉÔ±£©¶¼ÊÇ¿É·ÃÎʵÄ
2.private
ʹÓöÔÏ󣺳ÉÔ±
½éÉÜ£º³ÉÔ ......

¡¾×ª¡¿ÊµÕ½ Groovy: Groovy£ºJava ³ÌÐòÔ±µÄ DSL


Óà Groovy ±àд¸üÉٵĴúÂ룬Íê³É¸ü¶àµÄ¹¤×÷



 
¼¶±ð£º ³õ¼¶
Scott Davis , ´´Ê¼ÈË, ThirstyHead.com
2009 Äê 3 ÔÂ 09 ÈÕ
Groovy ר¼Ò Scott Davis ½«ÖØпªÊ¼×«Ð´ ʵս Groovy ϵÁÐÎÄÕ£¬¸ÃϵÁÐÎÄÕÂÓÚ 2006 ÄêÍ£Ö¹±àд¡£×÷Ϊ¿ªÆªÎÄÕ£¬±¾ÎĽ«½éÉÜ Groovy ×î½üµÄ·¢Õ¹ÒÔ¼° Groovy µ±Ç°µÄ״̬¡£È»ºóÁ˽ⴠ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ