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

Java°ü×°Ààѧϰ

ÎÒÃÇÓ¦ÓÃijÖÖÊý¾ÝÀàÐÍʱ£¬ºÜ¶àʱºòÒª½øÐÐÀàÐÍת»»µÈ²Ù×÷¡£ÔÚDelphiÖУ¬ÀàÐÍת»»º¯Êý¸Ð¾õºÜÁãÂÒ£¬Èç×Ö·û´®×ªÕûÐΡ¢ÕûÐαä×Ö½ÚÊý×éµÈµÈ¡£
¶øÔÚJAVAÖУ¬ÒѾ­½«JavaµÄ»ù±¾Êý¾ÝÀàÐÍÓëÆäÌṩÁËһЩ³£ÓõÄÀàÐͲÙ×÷µÄ·½·¨½øÐÐÁË·â×°£¬ÕâÑù²ÅÓÐÒ»ÇнԶÔÏóµÄ¸Ð¾õ¡£
ÔÚѧϰ°ü×°Ààʱ£¬ÕÒÁ˼¸¸ö±È½ÏÓÐÒâ˼µÄÀà½øÐÐÁËѧϰ£¡
Integer
Integer i=3;
//ÉÏÊöÓï¾äºÁÎÞÒÉÎÊ£¬ÊǽøÐÐÒ»¸öÀàµÄ´´½¨£¡µ«Í¨¹ýJava Decompiler½øÐз´±àÒëºó£¬·¢ÏÖÕâÌõÓï¾ä±»±àÒëÆ÷ÓÅ»¯³ÉÁËInteger integer = Integer.valueOf(1);±È½ÏÓÐÒâ˼£¬ÓÚÊǾͿ´¿´valueOfÖÐÊÇʲô
public static Integer valueOf(int i) {
final int offset = 128;
if (i >= -128 && i <= 127) { // must cache
return IntegerCache.cache[i + offset];
}
return new Integer(i);
}
IntegerCacheÊÇʲô
private static class IntegerCache {
private IntegerCache(){}
static final Integer cache[] = new Integer[-(-128) + 127 + 1];
static {
for(int i = 0; i < cache.length; i++)
cache[i] = new Integer(i - 128);
}
}
Ô­À´µ±´´½¨Integerʱ£¬-128-127·¶Î§ÄÚµÄÊý¾ÝÒѾ­ÒÔstatic finalµÄÐÎʽԤÏÈ´´½¨ÁË£¬·ÅÔÚ¶ÑÖС£µ±Óû§ÉùÃ÷¸Ã·¶Î§µÄIntegerÀàÐ͵ıäÁ¿Ê±£¬Ö±½Ó´ÓIntegerCacheÖжÁÈ¡¡£
¿ÉÒÔ×öÒ»¸öÊÔÑ飺
Integer integer=1;
Integer integer2=1;
if (integer==integer2){
System.out.println("ok");
}
½áÂÛÊÇ£ºintegerÓëinteger2ËùÖ¸µÄÄڴ涼ÊÇÒ»Öµģ¬ËùÒÔ´òÓ¡ok£¡
(ÔÚJava°æ¾­³£¿´µ½ºÜ¶àÈ˶ԶÑÓëÕ»¸ãµÃºÜºýÍ¿)
    2.  Boolean
Boolean boolean1=true;
//Õâ¸ö´úÂëÓëÉÏÊöµÄInteger integer=1µÄ×ö·¨ÀàËÆ£¬±àÒëÆ÷¶Ô´Ë½øÐÐÓÅ»¯(´ó¼Ò¿ÉÒÔÏÂÔØÒ»¸öjava Decompiler)¡£ÓÅ»¯ºóµÄÓï¾äΪBoolean boolean1 = Boolean.valueOf(true);Õâʱ¿ÉÒÔ¿´¿´valueOfµÄ´úÂë
public static Boolean valueOf(boolean b) {
return (b ? TRUE : FALSE);
}
ÔÙ¿´¿´TRUEÓëFALSEÊÇʲô£¿
public static final Boolean TRUE = new Boolean(true);

public static final Boolean FALSE = new Boolean(false);
Ô­À´BooleanÔÚ´´½¨Ê±ÒѾ­´´½¨Á˶þ¸östatic finalµÄBoolean¶ÔÏó£¬TrueÓëFalse¡£Õâʱ×ö¸öʵÑ飺
Boolean boolean1=true;
Boolean boolean2=true;


Ïà¹ØÎĵµ£º

Java¿ª·¢ºËÐļ¼ÊõÃæÊÔÐĵ÷ÖÎö

JavaµÄÊý¾Ý½á¹¹ÓÐÄÄЩ£¿MapÓëSetµÄ±¾ÖÊÇø±ðÊÇʲô£¿
·ÖÎö£ºJava³£¼ûµÄÊý¾Ý½á¹¹ÓÐCollectionºÍMap£¬ÆäÖÐCollection½Ó¿ÚÏ°üÀ¨ListºÍSet½Ó¿Ú£¬ÆäÏÂÓÖÓжà¸öʵÏÖÀàÈçListÏÂÓÐArrayList¡¢LinkedListºÍVectorµÈʵÏÖÀ࣬SetÏÂÓÐHashSet¡¢LinkedSetµÈʵÏÖÀàºÍSortedSet½Ó¿Ú£¬HashSetÏÂÓÐLinkedHashSet×ÓÀ࣬SortedSet½Ó¿ÚÏÂÓÐTre ......

c#Óëjava²í·¸ÃÈçºÎÑ¡Ôñ

¼´½«Òª×ßÉϹ¤×÷¸ÚλÁË£¬µ«ÊÇ×Ô¼º»¹ÔÚÓÌÔ¥Öе½µ×ÊÇÑ¡Ôñc#»¹ÊÇjava£¬¶¼ËµjavaÒÔºóµÄÇ°¾°·Ç³£µÄÀÖ¹Û£¬Ö÷ÒªÊÇÌåÏÖÔÚÒƶ¯Í¨ÐÅƽ̨ÉÏ£¬µ«ÊÇC#×÷Ϊ΢ÈíµÄ“ɱÊÖïµ”£¬Óë´Ëͬʱ΢Èí×÷Ϊҵ½çÀÏ´óµÄµØλ˭ÓÖÄܺ³¶¯ÄÄ£¬Î´À´µÄÔƼÆËã¶Ô¼ÆËã»úÖÕ¶Ëƽ̨µÄ¸ïÃüÐԵĸı䣬windows²Ù×÷ϵͳµÄ°ÔÖ÷µØλ²ÅÓпÉÄܱ»º³¶¯¡£c#µÄ·½±ã¼òµ¥Ó ......

JavaÁíÒ»ÖÖ·ÖÒ³¼¼Êõ

 ÕûÌåϵͳ²ÉÓÃJavaÖÐSpring ,Struts, Hibernate×é³É¡£
ÔÚActionÖУº
public ActionForward orgview(ActionMapping mapping, ActionForm form,HttpServletRequest request,HttpServletResponse response) {
// TODO Auto-generated method stub
ActionForward forward = new ActionForward("strpath");
Http ......

JAVAµ÷ÓÃDLLµÄ×¢ÒâÊÂÏî

ÍøÉÏJAVAµ÷ÓÃDLLµÄÎÄÕ²»ÉÙÁË£¬µ«·¢ÏÖÓÐЩ»¹ÊÇÓÐÎÊÌâ¡£¸ÕºÃÑо¿ÁËһϣ¬ÉÔ×ö¸ü¸Äºó£¬ÔÚVC2005ÉϲâÊÔͨ¹ý£¬£¨ReleaseºÍDebug°æ±¾¾ù¿É£©¡£
¸ü¸Äµã£º
1¡¢#include "jni.h"
2¡¢½«jni_md.hÖеģº#define JNICALL __stdcall±äΪ£º#define JNICALL __cdecl (º¯ÊýʹÓõÄÓ¦¸ÃÊÇcÓïÑÔµÄȱʡµ÷Ó÷½Ê½_cdecl·½Ê½£¬·ñÔòDLLÀ ......

java¶ÔÏóµÄ´óСÓëÒýÓÃÀàÐÍ

±¾ÎÄÀ´×ÔºÍÄãÔÚÒ»ÆðµÄ²©¿Í£¬Ô­ÎıêÌ⣺¡¶JVMµ÷ÓÅ×ܽá(¶þ)-һЩ¸ÅÄî¡·¡£±¾ÎÄ×ܽáÁËJVM¸ÅÄîÖеÄJava¶ÔÏóµÄ´óС£¬ÒÔ¼°ÈýÖÖÒýÓÃÀàÐ͵Ķ¨ÒåÓëÇø·Ö¡£ »ù±¾Êý¾ÝµÄÀàÐ͵ĴóСÊǹ̶¨µÄ£¬ÕâÀï¾Í²»¶à˵ÁË¡£¶ÔÓÚ·Ç»ù±¾ÀàÐ͵ÄJava¶ÔÏó£¬Æä´óС¾ÍÖµµÃÉÌȶ¡£ ÔÚJavaÖУ¬Ò»¸ö¿ÕObject¶ÔÏóµÄ´óСÊÇ8byte£¬Õâ¸ö´óСֻÊDZ£´æ¶ÑÖÐÒ»¸öûÓÐÈÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ