问题: Given a web application in which the request parameter productID contains a product identifier. Which twoEL expressions evaluate the value of the productID?()A、${productID}B、${param.productID}C、${params.productID}D、${params.productID[1]}E、${paramValues.productID}F、${paramValues.productID[0]}
查看答案
问题: 现有: public class Tester { public static void main (String[] args) { intx-5; Integer xl=x; Integer x2=x; int x3=new Integer(5); system..ut.print(x1.equals(x)); system..ut.print(xl==x); system..ut.print(x2.equals(xl)); system..ut.print(x2==xl); system..ut.print(x2==x3); system..ut.print(x2.equals(x3)); } } 结果为:() A、编译失败B、falsefalsetruetruetruetrueC、truetruetruetruetruetrueD、falsefalsetruetruetruefalseE、truefalsetruefalsefalsetrueF、运行时异常被抛出
问题: 现有: 1. class Book { 2. private final void read() { System.out.print("book "); } 3. } 4. class Page extends Book { 5. public static void main(String [] args) { 6. // insert code here 7. } 8. private final void read() { System.out.print("page "); } 9. } 和如下三个代码片段 ( x, y, z ): x. // just a comment y. new Page().read(); z. new Book().read(); 分别插入到第6行,有几个允许代码通过编译并可以运行且无异常?() A、 0B、 1C、 2D、 3
问题:以下对Scoket类的描述中,错误的是() A、Scoket类处于应用层B、利用Scoket类进行网络通讯时,不需要考虑具体的接入方式C、利用Scoket类进行网络通讯时,只能采取客户端发送消息,服务器反馈消息的机制D、利用Scoket类进行网络通讯时,首先需要确定服务器和客户端
问题:Java中方法绑定有哪些形式?()A、编译时刻绑定B、运行时刻绑定C、静态绑定D、私有绑定
问题:Java中怎样清除对象?能否控制Java中垃圾回收的时间?
问题:类中不允许定义私有的构造函数
问题:能够遍历泛型List〈Integer〉 al中的所有元素的语句是哪项?() A、for(Integer i : al)B、for(i : al)C、for(al)D、forEach(Integer i : al)
问题:Which layout manager is used when the frame is resized the buttons’s position in the Frame might be changed?() A、 BorderLayoutB、 FlowLayoutC、 CardLayoutD、 GridLayout
问题:已知Strings=“Java”,则下面哪些代码是正确的()A、s=s+1;B、char c=s[3];C、int i=s.length;D、String t=s+new Object();
问题:不必被捕获或声明抛出的异常是()A、NullPointerExcepitonB、ArithmeticExceptionC、FileNotFoundExceptionD、RuntimeException
问题:下列哪项是String的字面量?() A、“Hello”B、‘world’C、/u2345D、new String(“good”)
问题: public class NamedCounter { private final String name; private int count; public NamedCounter(String name) { this.name = name; } public String getName() { return name; } public void increment() { coount++; } public int getCount() { return count; } public void reset() { count = 0; } } Which three changes should be made to adapt this class to be used safely by multiple threads? ()A、 declare reset() using the synchronized keywordB、 declare getName() using the synchronized keywordC、 declare getCount() using the synchronized keywordD、 declare the constructor using the synchronized keywordE、 declare increment() using the synchronized keyword
问题:对于无用对象,在JAVA中如何处理() A、直接仍掉B、所有对象都需要回收C、只有动态创建的对象需要回收,自动创建的对象不需要回收D、可以不回收,但可能造成内存泄露,所以作为良好的编程习惯还是应当挥手每个无用的对象
问题: A developer is designing a multi-tier web application and discovers a need to hide the details of establishingand maintaining remote communications from the client. In addition, the application needs to find,in a transparent manner,the heterogeneous business components used to service the client’s requests. Which design patterns, working together, address these issues?()A、Business Delegate and Transfer ObjectB、Business Delegate and Service LocatorC、Front Controller and Business DelegateD、Intercepting Filter and Transfer Object
问题:Which of the following statements about variables and their scopes are true? () A、 Instance variables are member variables of a class.B、 Instance variables are declared with the static keyword.C、 Local variables defined inside a method are created when the method is executed.D、 Local variables must be initialized before they are used.
问题:HTTP中的POST和GET在下列哪些方面有区别()。A、数据位置B、明文密文C、数据安全D、长度限度E、应用场景
问题: import java.io.IOException; public class ExceptionTest( public static void main (String[]args) try ( methodA(); ) catch (IOException e) ( system.out.printIn(“Caught IOException”); ) catch (Exception e) ( system.out.printIn(“Caught Exception”); ) ) public void methodA () { throw new IOException (); } What is the result?() A、 The code will not compile.B、 The output is caught exception.C、 The output is caught IOException.D、 The program executes normally without printing a message.
问题:以下有关接口的叙述错误的是哪项?() A、 一个类可以实现多个接口B、 接口不能被继承C、 类实现接口时必须实现其中的方法D、 接口中只能包含抽象方法和常量
问题:Which statements concerning the event model of the AWT are true?() A、At most one listener of each type can be registered with a component.B、Mouse motion listeners can be registered on a List instance.C、There exists a class named ContainerEvent in package java.awt.event.D、There exists a class named MouseMotionEvent in package java.awt.event.E、There exists a class named ActionAdapter in package java.awt.event.