问题:执行一个java程序“FirstApp”的方法是()A、运行:“java FristApp.java”B、运行:“java FristApp”C、运行:“javac FristApp.class”D、直接双击编译好的java目标码文件执行
查看答案
问题:构造函数只能重载不能覆盖
问题:组件与模型分离的作用是什么?()A、更准确地设置组件的状态B、可以更高效地对组件进行操作,并且也更容易在组件之间共享和数据C、跳过事件处理类,直接处理组件的事件D、数据更准确
问题:程序员已经创建了一个类,该类的实例可以用做Hashtable 的键(key)。哪两项是对的?() A、该类有一个返回类型为 int 的 equals 方法。B、该类有一个返回类型为 boolean 的 equals 方法。C、该类有一个接收一个参数的 equals 方法。D、该类有一个接收两个参数的 equals 方法。
问题:类的可访问性不影响类成员的可访问性
问题: package com.company.application; public class MainClass { public static void main(String[] args) { } } And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to “.“ (current directory). Which two java commands entered at the command line will run MainClass?()A、 java MainClass if run from the /apps directoryB、 java com.company.application.MainClass if run from the /apps directoryC、 java -classpath /apps com.company.application.MainClass if run from any directoryD、 java -classpath . MainClass if run from the /apps/com/company/application directoryE、 java -classpath /apps/com/company/application:. MainClass if run from the /apps directoryF、 java com.company.application.MainClass if run from the /apps/com/company/application directory
问题:Which two are characteristics of the Intercepting Filter pattern?()A、 it provides centralized request handling for incoming requests.B、 It forces resource authentication to be distributed across web components.C、 It reduces coupling between presentation-tier clients and underlying business services.D、 It can be added and removed unobtrusively, without requiring changes to existing code.E、 It allows preprocessing and postprocessing on the incoming requests and outgoing responses.
问题:如何获得数组的长度?()A、利用全局函数getArrayLen()B、利用数组的getLength()函数C、利用数组的length()函数D、利用数组的length变量
问题:下列关于JDK、JRE和JVM的描述。哪项正确?() A、JDK中包含了JRE,JVM中包含了JREB、JRE中包含了JDK,JDK中包含了JVMC、JRE中包含了JDK,JVM中包含了JRED、JDK中包含了JRE,JRE中包含了JVM
问题: You are assigned the task of building a panel containing a TextArea at the top, a label directly below it,and a button directly below the label. If the three components are added directly to the panel. Which layout manager can the panel use to ensure that the TextArea absorbs all of the free vertical space when the panel is resized?()A、 GridLayout.B、 CardLayout.C、 FlowLayout.D、 BorderLayout.E、 GridBagLayout.
问题: 现有: - list是一个合法的集合引用 - getCollection()返回一个合法集合的引用 哪两个是合法的?() A、 for(Object o ; list)B、 for(Object o : getCollection()C、 for(Object o : list.iterator()D、 for(lterator i ; list.iterator() ; i.hasNext () )E、 for(lterator i=list.iterator(); i.hasNext (); )
问题:You want a class to have access to members of another class in the same package. Which is the most restrictive access modifier that will accomplish that will accomplish this objective?()A、 PublicB、 PrivateC、 ProtectedD、 TransientE、 No access modifier is required.
问题: 现有: class Banana2 f static int X=2; public static void main (String [] args) { int X=2; Banana2 b=new Banana2(); b.go(x); } static {x+=x; } void go (int x) { ++x; System. out.println (x); } 结果为:() A、7B、5C、3D、2
问题: 现有: class Birds { public static void main (String [] args) { try { throw new Exception () ; } catch (Exception e) { try { throw new Exception () ; } catch (Exception e2) { System.out.print ("inner "); } System. out.print ( "middle" ) ; } System.out.print ("outer") ; } } 结果是()A、 inner outerB、 middle outerC、 inner middle outerD、.编译失败
问题: 1. interface A { public void aMethod(); } 2. interface B { public void bMethod(); } 3. interface C extends A,B { public void cMethod(); } 4. class D implements B { 5. public void bMethod() { } 6. } 7. class E extends D implements C { 8. public void aMethod() { } 9. public void bMethod() { } 10. public void cMethod() { } 11. } What is the result?() A、 Compilation fails because of an error in line 3.B、 Compilation fails because of an error in line 7.C、 Compilation fails because of an error in line 9.D、 If you define D e = new E(), then e.bMethod() invokes the version of bMethod()defined in Line 5.E、 If you define D e = (D)(new E()),then e.bMethod() invokes the version of bMethod() defined in Line 5.F、 If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.
问题:Which two can be used to create a new Thread? ()A、 Extend java.lang.Thread and override the run method.B、 Extend java.lang.Runnable and override the start method.C、 Implement java.lang.thread and implement the run method.D、 Implement java.lang.Runnable and implement the run method.E、 Implement java.lang.Thread and implement the start method.
问题: 现有: 1. interface Altitude { 2. //insert code here 3. } 和4个声明: int HIGH = 7; public int HIGH = 7; abstract int HIGH = 7; interface int HIGH = 7; 分别插入到第2行,有多少行可以编译?() A、 0B、 1C、 2D、 3E、 4
问题:Java语言中表达式“11”+22的结果是哪项?() A、33B、1122C、22D、表达式错误
问题:下面哪些说法的是正确的()A、一个控件上可以注册多个监听器B、一个监听器只能注册到一个控件C、一个类只能实现一个监听器接口D、可以从控件上删除事件监听器
问题: 现有: String s="write a line to a file"; w.print(s+"/n"); 哪一个是对的?() A、w即可以是PrintWriter类型,也可以足BufferedWriter类型。B、w即不可以是PrintWriter类型,也不可以足BufferedWriter类型。C、w可以是BufferedWriter类型,但不可以是PrintWriter类型。D、 w以是PrintWriter类型,但不可以是BufferedWriter类型。