1z0-809 試験問題 41

次のコードフラグメントがあるとします:
ZonedDateTime 出発 = ZonedDateTime.of(2015, 1, 15, 3, 0, 0, 0, ZoneID.of ( "UTC-7"));
ZonedDateTime 到着 = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of ( "UTC-5"));
long hrs = ChronoUnit.HOURS.between(depart, arrive); //行 n1
System.out.println("移動時間は" + 時間 + "時間");
結果はどうなりましたか?
  • 1z0-809 試験問題 42

    Given this code;

    Which two are correct after this class is instantiated and tested?
  • 1z0-809 試験問題 43

    次のコードフラグメントがあるとします:
    ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 1, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of("UTC-5")); long hrs = ChronoUnit.HOURS.between(depart, arrive); //line n1 System.out.println("Travel time is" + hrs + "hours"); 結果はどうなりますか?
  • 1z0-809 試験問題 44

    与えられた条件:
    クラス UserException は Exception { } を拡張します。
    AgeOutOfLimitException クラスは UserException { } を拡張します。
    そしてコードフラグメント:
    クラスApp {
    public void doRegister(String name, int age)
    UserException、AgeOutOfLimitException をスローします {
    if (name.length() < 6) {
    新しい UserException () をスローします。
    } それ以外の場合 (年齢 >= 60) {
    新しい AgeOutOfLimitException () をスローします。
    } それ以外 {
    System.out.println("ユーザーは登録されています。");
    }
    }
    パブリック静的void main(String[] args)はUserExceptionをスローします{
    アプリ t = 新しいアプリ ();
    t.doRegister("マシュー", 60);
    }
    }
    結果はどうなりましたか?
  • 1z0-809 試験問題 45

    Given:
    Class A { }
    Class B { }
    Interface X { }
    Interface Y { }
    Which two definitions of class C are valid?