nyoj 73 比大小 【java大數】,nyoj大數
java大數。
代碼:
import java.util.Scanner;import java.math.*;public class Main{public static void main(String[] args){Scanner cin = new Scanner(System.in);BigInteger a, b;BigInteger t = BigInteger.valueOf(0);a = cin.nextBigInteger();b = cin.nextBigInteger();while(!(a.equals(t)&&b.equals(t))){if(a.equals(b)){System.out.println("a==b");}else if(a.compareTo(b)>0){System.out.println("a>b");}else System.out.println("a<b");a = cin.nextBigInteger();b = cin.nextBigInteger();}}} 題目連結:http://acm.nyist.net/JudgeOnline/problem.php?pid=73
出現javalangNullPointerException at comcndaoCustomerDaoqueryConnection(CustomerDaojava:73)
try語句裡面應該有個con=XXXX.getConnection(); 吧?
this.setConnection()這個是賦值的嗎?如果不是就是因為
con對象沒有初始化賦值。在調用的時候這個對象其實是null,所以會報null 指標異常。
java藍芽三國殺173的
非得是 藍芽嗎 現在三國殺都有JAVA了 就說 你到官網上看看嘛 My Phone就是JAVA的 觸屏的 就是在官網上的