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

java ¶ÔdoubleµÄ ÓÐȤ´¦Àí £¨j»ù p30£©

ºÜÖǻۣ¬ÆÄÓÐÊýѧÖÐÎÞÇî·ÖÎöµÄÒâζ
Õæ°®ËÀjavaÁË
public class FunnyNumbers {
public static void main(String[] args) {
double largeNum = (int)Math.exp(4000.0);
//int ²»Äܳý0
//Exception in thread "main" java.lang.ArithmeticException: / by zer oat FunnyNumbers.main(FunnyNumbers.java:4)
double posDivZero = 10.0/0.0;
double negDivZero = -10.0/0.0;
double zeroDivZero = 0.0/0.0;

p(largeNum);
p(posDivZero);
p(negDivZero);
p(zeroDivZero);

double x = largeNum + posDivZero;
double y = largeNum + negDivZero;
double z = largeNum + zeroDivZero;

p("x= " + x);
p("y= " + y);
p("z= " + z);
}
public static void p (Object o) {
System.out.println(o);
}
}
/*
2.147483647E9
Infinity
-Infinity
NaN
x= Infinity
y= -Infinity
z= NaN
*/


Ïà¹ØÎĵµ£º

java ×¢ÊÍ : annotations ÔªÊý¾Ý

annotations : ×¢ÊÍ
ºÃ´¦
1.Îĵµ±àÖÆ
2.±àÒëÆ÷¼ì²é
3.´úÂë·ÖÎö
JSR 175 ÊDZà³ÌÓïÑÔµÄÔªÊý¾Ý¹¤¾ß,Ϊ½«ÔªÊý¾ÝºÏ²¢µ½ºËÐÄjavaÓïÑÔÖÐÌṩÕýʽÀíÓɺÍ˵Ã÷
»ù±¾ÖªÊ¶:
×¢ÊͲÉÓÃ"@"±ê¼ÇÐÎʽ,ºóÃæÊÇ×¢ÊÍÃû³Æ,È»ºóÔÚÐèÒªÊý¾Ýʱ,ͨ¹ýname=value¶ÔÏò×¢ÊÍÌṩÊý¾Ý
×¢Ê͵ÄÈý¸ö»ù±¾ÖÖÀà:
    ±ê¼Ç×¢ÊÍ ......

.netºÍjavaÖ®±È½Ï javaѧϰ

×î½ü¹«Ë¾Òª¿ª·¢Windowsƽ̨ÉϵIJúÆ·£¨ÓÉÓÚÉæ¼°µ½ÉÌÒµ»úÃÜ£¬ËùÒÔĿǰÎÞ·¨¶ÔÕâ¸ö²úÆ·×öÏêϸ½éÉÜ£©£¬²ÉÓÃ.Net¼¼Êõ½øÐпª·¢£¬ÎÒ¸ºÔðµÄÊÇ»ùÓÚ Visual Studio²å¼þ»úÖÆµÄÐÐÒµ¿ª·¢¹¤¾ßµÄ¿ª·¢¡£´Ó¿ªÊ¼½Ó´¥.Netµ½ÏÖÔÚÒѾ­ÓнüÈý¸öÔÂÁË£¬¶øÇÒÒ²¿ª·¢³öÁ˵ÚÒ»¸ö°æ±¾£¬¶Ô.NetÒѾ­ÓÐÁËһЩÈÏʶ£¬ÓÉÓÚÒÔǰÖ÷ÒªÓÃJava¡¢PythonµÈÓïÑ ......

java¼ÓÃÜÓë½âÃÜ£¨Ò»£©

jdk°²È«Ç¿¶ÈÉèÖãº
   http://java.sun.com/javase/downloads/index.jspÖеÄOther DownloadsÏÂÔØ 
   ½âѹzip,
   ÓÃÆäÖеÄÁ½¸öjar°ü¸²¸Çjdk6ÏÂ\%JDK_HOME%\jre\lib\securityĿ¼ÏµÄjar°ü
   jreĿ¼ÏÂÒ²×÷ÏàͬÅäÖÃ
   È»ºóͨ¹ý´úÂë¶Î
try {
  & ......

javaµ÷Óö¯Ì¬¿â(.dll»ò.so)

Ö±½Óͨ¹ýmainÈë¿Ú:
argumentsÉèÖãº-Djava.library.path=¶¯Ì¬¿âËùÔÚĿ¼
ÔÚLinuxÉϵ÷.soÎļþ£º.soÎļþ ±ØÐëÃüÃûΪ£ºlibXXX.so,È磺libJni.so
ÔÚWindowsÉϵ÷.dllÎļþ£º.dllÎļþ ÃüÃû²»Òª¼Ólib,Ö±½ÓÃüÃûΪ£ºXXX.dll È磺Jni.dll
Àý£º
¶¯Ì¬¿â£ºlibJniNassirDecrypt.so »ò JniNassirDecrypt.dll
javaµ÷Óö¯Ì¬¿â´úÂë:
Str ......

JavaµÚ¶þ´ÎÉÏ»ú£¨ÕýÔò±í´ïʽ£©

±àдһ¸ö³ÌÐò£¬ÅжÏÒ»¸ö×Ö·û´®ÊÇ·ñÊǺϷ¨µÄJava±êʶ·û£»
//create string
import java.util.regex.*;
public class Split {
public static void main (String[] args) {
Pattern pattern = Pattern.compile("[,]");
String[] arrStr = pattern.split("abstract,break,byte,boole ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ