易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

public static void main(String[] args) {  for (int i=0;i6) break;  }  System.out.println(i);  }  What is the result?() 

A、 6

B、 7

C、 10

D、 11

E、 Compilation fails.

F、 An exception is thrown at runtime.

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0,object), but does NOT need to support quick random access. What supports these requirements?() 

    A、 java.util.Queue

    B、 java.util.ArrayList

    C、 java.util.LinearList

    D、 java.util.LinkedList

  • int index = 1;  boolean[] test = new Boolean[3];  boolean foo= test [index];   What is the result?()  

    A、 Foo has the value of 0.

    B、 Foo has the value of null.

    C、 Foo has the value of true.

    D、 Foo has the value of false.

    E、 An exception is thrown.

    F、 The code will not compile.

  • Given:   1.d is a valid, non-null Date object   2.df is a valid, non-null DateFormat object set to the current locale    What outputs the current locale’s country name and the appropriate version of d’s date?()

    A、Locale loc = Locale.getLocale(); System.out.println(loc.getDisplayCountry()+   + df.format(d));

    B、Locale loc = Locale.getDefault(); System.out.println(loc.getDisplayCountry()+   + df.format(d));

    C、Locale loc = Locale.getLocale();System.out.println(loc.getDisplayCountry()+   + df.setDateFormat(d));

    D、 Locale loc = Locale.getDefault();System.out.println(loc.getDisplayCountry()+   + df.setDateFormat(d));

  • int i = 0;  while (true) { if(i==4) {  break;  }  ++i;  }  System.out.println(“i=”+i);  What is the result?()  

    A、 i = 0

    B、 i = 3

    C、 i = 4

    D、 i = 5

    E、 Compilation fails.

  • A team of programmers is reviewing a proposed API for a new utility class.After some discussion, they realize that they can reduce the number of methods in the API without losing any functionality.If they implement the new design, which two principles will they be promoting?()

    A

    Looser coupling

    B

    Tighter coupling

    C

    Lower cohesion

    D

    Higher cohesion

    E

    Weaker encapsulation

    F

    Stronger encapsulation

联系客服 会员中心
TOP