会计考友 发表于 2012-8-4 12:33:16

2011年JAVA认证模拟题(53)

  Q157 Which of the following are true?
  A If a package statement is included in a source code file, it must appear as the first non-blank line.
  B If an import statement is included in a source code file, it must appear as the first non-blank line.
  C If a main() method is included in a source code file, it must appear as the first non-blank line.
  D If a public interface is declared in a source code file, it must have the same name as the source code file.
  Q158 Which of the following are true about this method declaration?
  void myMethod (String s) {
  }
  A myMethod() is static
  B myMethod() does not return a value.
  C myMethod() is abstract.
  D myMethod() may not be accessed outside of the package in which it is declared.
  Q159 If an object with a finalize() method has been garbage collected, which of the following are true about that object?
  A The object became unreachable.
  B The object’s finalized() method was invoked by the garbage collector.
  C The memory used by the object is subject to reuse.
  D The object did not implement any interfaces.
  Q157 AD
  Q158 BD
  Q159 ABC
页: [1]
查看完整版本: 2011年JAVA认证模拟题(53)