A == B ?Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 47896 Accepted Submission(s): 7324Problem DescriptionGive you two numbers A and B, if A is equal to B, you should print "YES", or
How Many Fibs?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2814 Accepted Submission(s): 1112Problem DescriptionRecall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := fn-1 +
06-27 04:48:02.123: ERROR/AndroidRuntime(787): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{net.android.surfacetest/net.android.surfacetest.MainActivity}: java.lang.IllegalAccessException: access to class not allowed06-27
public class Test_Runnable implements Runnable{ private String name; private static int next = 0; private static int LEN = 10000; private final static int NUM = 5; private static String str[] = new String[LEN]; public Test_Runnable(
印象裡,只要除以0,java應該會拋出異常,但是今天運行程式發現,除以一個double型的0時不會出現異常,結果是”infinity“。實驗了一下,果然如此:代碼很簡單:double a= 0.0;int b=0;System.out.println(5/a);System.out.println(5/b);輸出如下:InfinityException in thread "main" java.lang.ArithmeticException: / by