网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
多选题
31. // some code here  32. try {  33. // some code here  34. } catch (SomeException se) {  35. // some code here  36. } finally {  37. // some code here  38. }  Under which three circumstances will the code on line 37 be executed?()
A

The instance gets garbage collected.

B

The code on line 33 throws an exception.

C

The code on line 35 throws an exception.

D

The code on line 31 throws an exception.

E

The code on line 33 executes successfully.


参考答案

参考解析
解析: 暂无解析
更多 “多选题31. // some code here  32. try {  33. // some code here  34. } catch (SomeException se) {  35. // some code here  36. } finally {  37. // some code here  38. }  Under which three circumstances will the code on line 37 be executed?()AThe instance gets garbage collected.BThe code on line 33 throws an exception.CThe code on line 35 throws an exception.DThe code on line 31 throws an exception.EThe code on line 33 executes successfully.” 相关考题
考题 单选题It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()A Mark the method with the keyword public.B Mark the method with the keyword protected.C Mark the method with the keyword private.D Mark the method with the keyword package.E Do not mark the method with any accessibility modifiers.

考题 单选题Which statement is true for the class java.util.HashSet? ()A  The elements in the collection are ordered.B  The collection is guaranteed to be immutable.C  The elements in the collection are guaranteed to be unique.D  The elements in the collection are accessed using a unique key.E  The elements in the collections are guaranteed to be synchronized.

考题 单选题public class Test {  public static void main(String[] args) {  int x = 0;  assert (x  0): “assertion failed”;  System.out.println(“finished”);  }  }  What is the result?()A  finishedB  Compilation fails.C  An AssertionError is thrown.D  An AssertionError is thrown and finished is output.

考题 单选题Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. private static void process(byte[] b) { }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?()A  process(bytes);B  BitUtils.process(bytes);C  app.BitUtils.process(bytes);D  util.BitUtils.process(bytes);E  import util.BitUtils. *; process(bytes);F  SomeApp cannot use the process method in BitUtils.

考题 单选题When comparing java.io.BufferedWriter to java.io.FileWriter, which capability exists as a method in only one of the two?()A  closing the streamB  flushing the streamC  writing to the streamD  marking a location in the streamE  writing a line separator to the stream

考题 多选题switch (i)  {  default:  System.out.printIn(“Hello”);  )   What are the two acceptable types for the variable i?()ACharBByteCFloatDDoubleEObject

考题 多选题NumberFormat nf= NumberFormat.getInstance();  nf.setMaximumFractionDigits(4);  nf.setMinimumFractionDigits(2);  String a = nf.format(3.1415926);  String b = nf.format(2);  Which two are true about the result if the default locale is Locale.US?()AThe value of b is 2.BThe value of a is 3.14.CThe value of b is 2.00.DThe value of a is 3.141.EThe value of a is 3.1415.FThe value of a is 3.1416.GThe value of b is 2.0000.

考题 多选题class A {  A() { }  }  class B extends A {  }  Which two statements are true?()AClass B’s constructor is public.BClass B’s constructor has no arguments.CClass B’s constructor includes a call to this().DClass B’s constructor includes a call to super().