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

java²»³£ÓÃ

strictfp ¹Ø¼ü×Ö
¿ÉÄܺܶàÈ˶¼Ã»ÓÐÓùýÕâ¸ö¹Ø¼ü×Ö£¬Èç¹ûºÜ¶àÈËÓÃÄDZêÌâÒ²ÏÔµÃûʲôÒâÒåÁË¡£
Ê×ÏÈ¿´Á½¶ÎºÜ¼òµ¥µÄ´úÂ룺
public static void main(String[] args){
double w = 7*8/3;
System.out.println(w);
}
public static strictfp void main(String[] args){
double w = 7*8/3;
System.out.println(w);
}
ÔËÐнá¹û¶¼ÊÇ 18.0;
´ÓÕâÀïµÄ½á¹û¿´Ã»Ê²Ã´²î±ð£¬Ö»ÊÇ´úÂëÖмÓÁ˹ؼü×Östrictfp¡£Èç¹ûÄãÖ»ÔÚ±¾»úÉÏ×ö²âÊԵõ½½á¹ûÓÀÔ¶¶¼ÊÇÒ»ÑùµÄ£¬
ÏÂÃæÎÒÀ´ÏêϸµÄ½éÉÜһϣ¬ºÇºÇ£¬²Î¿¼Êé½å£º
1.strictfp: strict float point ¾«È·¸¡µã£¬Ê¹ÓÃÁËstrictfp¹Ø¼ü×־ͱØÐëʹÓÃÑϸñµÄ¸¡µã¼ÆËã¡£
2.Ïê½â£º
¿ÉÒÆÖ²ÊÇjavaÓïÑÔµÄÉè¼ÆÄ¿±êÖ®Ò»¡£ÎÞÂÛÔÚÄĸöÐéÄâ»úÉÏÔËÐУ¬Í¬Ò»¸öÔËËãÓ¦¸ÃµÃµ½Í¬ÑùµÄ½á¹û¡£¶ÔÓÚ¸¡µãÊýµÄËãÊõÔËË㣬ʵÏÖÕâÑùµÄ¿ÉÒÆÖ²ÐÔÊÇÏ൱À§Äѵġ£
doubleÀàÐÍʹÓÃ64λ´æ´¢Ò»¸ödoubleÊýÖµ£¬¶øÓÐЩ´¦ÀíÆ÷ʹÓÃ80λ¸¡µã¼Ä´æÆ÷¡£ÕâЩ¼Ä´æÆ÷Ôö¼ÓÁËÖмä¼ÆË㾫¶È¡£ÀýÈ磬ÏÂÁÐÔËË㣺double w = x * y / z;
ºÜ¶àIntel´¦Àí¼ÆËãx * y£¬²¢ÇÒ½«½á¹û´æ´¢ÔÚ80λµÄ¼Ä´æÆ÷ÖУ¬ÔÙ³ýÒÔz²¢½«½á¹û½Ø¶ÏΪ64λ¡£ÕâÑù¿ÉÒԵõ½Ò»¸ö¸ü¼Ó¾«È·µÄ¼ÆËã½á¹û£¬²¢ÇÒ»¹Äܹ»±ÜÃâ²úÉúÖ¸ÊýÒç³ö¡£
µ«ÊÇ£¬Õâ¸ö½á¹û¿ÉÄÜÓëʼÖÕÔÚ64λ»úÆ÷ÉϼÆËãµÄ½á¹û²»Ò»Ñù¡£Òò´Ë£¬JavaÐéÄâ»úµÄ×î³õ¹æ·¶¹æ¶¨ËùÓеÄÖмä¼ÆË㶼±ØÐë½Ø¶Ï¡£ÕâÖÖÐÐΪÔâµ½ÁËÊýÖµ¼ÆËãÍÅÌåµÄ·´¶Ô¡£½Ø¶Ï
¼ÆËã²»½ö¿ÉÄܵ¼ÖÂÒç³ö£¬¶øÇÒÓÉÓڽضϲÙ×÷ÐèÒªÏûºÄʱ¼ä£¬ËùÒÔÔÚ¼ÆËãÉÏ»¹±È¾«È·¼ÆËãÂý¡£Îª´Ë£¬java³Ì¶ÈÉè¼ÆÓïÑÔ³ÐÈÏ×îÓÅÐÔÄÜÓëÀíÏë½á¹ûÖ®¼ä´æÔÚ³åÍ»£¬²¢¸øÓèÁ˸Ľø¡£
ÔÚĬÈÏÇé¿öÏ£¬ÐéÄâ»úÉè¼Æ¶¼ÔÊÐí½«Öмä¼ÆËã½á¹û²ÉÓÃÀ©Õ¹µÄ¾«¶È¡£µ«ÊÇ£¬¶ÔÓÚʹÓÃstrictfp¹Ø¼ü×Ö±ê¼ÇµÄ·½·¨±ØÐëÑϸñµÄ¸¡µã¼ÆËãÀ´²úÉúÀíÏëµÄ½á¹û¡£ÀýÈ磬¿ÉÒÔ°Ñmain
·½·¨±ê¼ÇΪ£º
public static strictfp void main(String[] args)
ÓÚÊÇ£¬ÔÚmain·½·¨ÖеÄËùÓÐÖ¸Á½«Ê¹ÓÃÑϸñµÄ¸¡µã¼ÆËã¡£Èç¹û½«Ò»¸öÀà±ê¼ÇΪstrictfp£¬Õâ¸öÀàÖеÄËùÓз½·¨¶¼ÒªÊ¹ÓÃÑϸñµÄ¸¡µã¼ÆËã¡£
ʵ¼Ê¼ÆË㷽ʽ½«È¡¾öÓÚIntel´¦ÀíÆ÷¡£ÔÚĬÈÏÇé¿öÏ£¬Öмä½á¹ûÔÊÐíʹÓÃÀ©Õ¹µÄÖ¸Êý£¬µ«²»ÔÊÐíʹÓÃÀ©Õ¹µÄβÊý(IntelоƬÔڽضÏβÊý²¢²»ËðʧÐÔÄÜ)¡£Òò´Ë£¬ÕâÁ½ÖÖ·½Ê½µÄ
Çø±ð½ö½öÔÚÓÚ²ÉÓÃĬÈϵķ½Ê½²»»á²úÉúÒç³ö£¬¶ø²ÉÓÃÑϸñµÄ¼ÆËãÓпÉÄܲúÉúÒç³ö¡£
¶Ô²»ÊǺÜÁ˽âµÄҲûʲô¹Øϵ£¬¶ÔÓÚ´ó¶àÊý¾Ý³ÌÀ´Ëµ£¬¸¡µãÒç³ö²»ÊôÓÚ´óÎÊÌâ¡£


Ïà¹ØÎĵµ£º

java Preferences³Ö¾Ã»¯Ê¹ÓÃʾÀý

  jdk1.4ÒýÈëÁËPreferences API£¬Ëü±È¶ÔÏóÐòÁл¯¸ü½Ó½üÓڳ־û¯£¬ÒòΪËü¿ÉÒÔ×Ô¶¯´æÈ¡ºÍ¶ÁÈ¡ÐÅÏ¢¡£PreferencesÀàËÆÓÚ¼üÖµ¶Ô£¬´æÈ¡ÔÚÒ»¸ö½Úµã²ãÎö½á¹¹ÖУ¬²»¹ýËüÖ»ÄÜ´æȡԭʼÊý¾ÝÀàÐͺÍ×Ö·û´®£¬Ã¿¸ö×Ö·û´®µÄ³¤¶È²»Äܳ¬¹ý8k¡£
import java.util.prefs.Preferences;
public class PreferencesDemo {

public static ......

java ·´Éä»úÖÆ ——С½á

1£©Õý³£Çé¿öÏÂÎÒÃÇ¿ÉÒÔͨ¹ýÀàʵÀý»¯Ò»¸ö¶ÔÏó£¬ÄÇôͨ¹ý·´Éäʵ¼ÊÉϾͿÉÒÔͨ¹ýÒ»¸ö¶ÔÏóµÃµ½´ËÀàÍêÕûµÄ°ü.ÀàÃû³Æ
JAVA·´Éä»úÖÆÊÇÔÚÔËÐÐ״̬ÖУ¬¶ÔÓÚÈÎÒâÒ»¸öÀ࣬¶¼Äܹ»ÖªµÀÕâ¸öÀàµÄËùÓÐÊôÐԺͷ½·¨£»¶ÔÓÚÈÎÒâÒ»¸ö¶ÔÏ󣬶¼Äܹ»µ÷ÓÃËüµÄÈÎÒâÒ»¸ö·½·¨£»ÕâÖÖ¶¯Ì¬»ñÈ¡µÄÐÅÏ¢ÒÔ¼°¶¯Ì¬µ÷ÓöÔÏóµÄ·½·¨µÄ¹¦ÄܳÆΪjavaÓïÑԵķ´Éä»úÖÆ¡£
......

Ê®¸ö×îºÃµÄJavaÐÔÄܹÊÕÏÅųý¹¤¾ß

ÉùÃ÷£ºJavaEyeÐÂÎÅÎÄÕµİæȨÊôÓÚJavaEyeÍøÕ¾ËùÓУ¬ÑϽûÈκÎÍøվתÔر¾ÎÄ£¬·ñÔò±Ø½«×·¾¿·¨ÂÉÔðÈΣ¡
ÍƼöÊ®¸ö×îºÃµÄJavaÐÔÄܹÊÕÏÅųý¹¤¾ß£º
   1.jconsoleÊÇËæ×ÅJDK 1.5¶øÍƳöµÄ¡£ÕâÊÇÒ»¸öJava¼à²âºÍ¹ÜÀí¿ØÖÆ̨-JMX¼æÈݵÄͼÐι¤¾ßÀ´¼à²âJavaÐéÄâ»ú¡£ËüÄܹ»Í¬Ê±¼à²â±¾µØºÍÔ¶³ÌµÄJVMs¡£ÏêÇé¿É²é¿´£ºjconsole¹¤¾ß½ ......

Java Socket ±à³Ì

Ò»£¬ÍøÂç±à³ÌÖÐÁ½¸öÖ÷ÒªµÄÎÊÌâ
Ò»¸öÊÇÈçºÎ׼ȷµÄ¶¨Î»ÍøÂçÉÏһ̨»ò¶ą̀Ö÷»ú£¬ÁíÒ»¸ö¾ÍÊÇÕÒµ½Ö÷»úºóÈçºÎ¿É¿¿¸ßЧµÄ½øÐÐÊý¾Ý´«Êä¡£
ÔÚTCP/IPЭÒéÖÐIP²ãÖ÷Òª¸ºÔðÍøÂçÖ÷»úµÄ¶¨Î»£¬Êý¾Ý´«ÊäµÄ·ÓÉ£¬ÓÉIPµØÖ·¿ÉÒÔΨһµØÈ·¶¨InternetÉϵÄһ̨Ö÷»ú¡£
¶øTCP²ãÔòÌṩÃæÏòÓ¦ÓõĿɿ¿µÄ»ò·Ç¿É¿¿µÄÊý¾Ý´«Êä»úÖÆ£¬ÕâÊÇÍøÂç±à³ÌµÄÖ÷Òª¶Ô ......

JAVA ÅàѵÌâ¿â JSP

Ò»¡¢JSP_Ñ¡ÔñÌâ
1. ÒÔÏÂÑ¡ÏîÖв»ÊÇjspÒþʽ¶ÔÏóµÄÊÇ£º£¨ £©
A  pageContext
B  context
C  application
D  out
²Î¿¼´ð°¸£ºB
2. ÏÂÃæÄÄÒ»¸ö²»ÊÇJSP±¾ÉíÒѼÓÔصĻù±¾Àࣿ£¨ £©
A  java.lang.* 
B  java.io.* 
C  javax.servlet.* 
D  javax.servlet.j ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ