For an HttpServlet Response response, which two create a custom header()A、 response.set Header (“X-MyHeader”. “34”):B、 response.addHeader (“X-MyHeader”. “34”):C、 response. Set Header (new Http Header (“X-MyHeader”. “34”)):D、 response.addHeader(new Http Header (“X-MyHeader”. “34”)):E、 response. addHeader (new Servlet Header (“X-MyHeader”. “34”)):F、 response. setHeader (new Servlet Header (“X-MyHeader”, “34”)):

For an HttpServlet Response response, which two create a custom header()

  • A、 response.set Header (“X-MyHeader”. “34”):
  • B、 response.addHeader (“X-MyHeader”. “34”):
  • C、 response. Set Header (new Http Header (“X-MyHeader”. “34”)):
  • D、 response.addHeader(new Http Header (“X-MyHeader”. “34”)):
  • E、 response. addHeader (new Servlet Header (“X-MyHeader”. “34”)):
  • F、 response. setHeader (new Servlet Header (“X-MyHeader”, “34”)):

相关考题:

要产生一个动作监听器类,需要实现什么接口?()A、OnActionPerformed接口;B、ActionEvent接口;C、OnEventAction接口;D、ActionListener接口;

Given a portion of a valid Java EE web application’s directory structure: MyApp | |-- File1.html | |-- Directory1 ||-- File2.html| |-- META-INF |-- File3.html You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by your webclient’s browsers. Which statement is true?()A、All three files are directly accessible.B、Only File1.html is directly accessible.C、Only File2.html is directly accessible.D、Only File3.html is directly accessible.E、Only File1.html and File2.html are directly accessible.

10. class Nav{  11. public enum Direction { NORTH, SOUTH, EAST, WEST }  12. }  13. public class Sprite{  14. // insert code here  15. }  Which code, inserted at line 14, allows the Sprite class to compile?() A、 Direction d = NORTH;B、 Nav.Direction d = NORTH;C、 Direction d = Direction.NORTH;D、 Nav.Direction d = Nav.Direction.NORTH;

单选(1分)用于执行Java程序的JDK工具是?()  A、javacB、jdbC、javaD、junit

假设有一个面板PanelOne,它的布局管理方式是BorderLayt。它的背景颜色被显式地设为黑色而前景颜色被显式地设为白色。有另一个面板PanelTwo,它的布局管理方式是FlowLayout,被添加到PanelOne的center区域,PanelTwo的前景颜色是红色,没有背景颜色被指定。一个带有文字的Label被添加到PanelTwo上,Label没有设置颜色,下列叙述正确的是哪项?() A、 Label的文字是白色B、 Label的文字是红色C、 PanelTwo的布局管理器覆盖PanelOne的布局管理器D、 PanelTwo是黑色背景

Which methods from the String and StringBuffer classes modify the object on which they are called?()  A、The charAt() method of the String class.B、The toUpperCase() method of the String class.C、The replace() method of the String class.D、The reverse() method of the StringBuffer class.E、The length() method of the StringBuffer class.

Which statements about static inner classes are true?()A、 A static inner class requires a static initializer.B、 A static inner class requires an instance of the enclosing class.C、 A static inner class has no reference to an instance of the enclosing class.D、 A static inner class has access to the non-static members of the outer class.E、 Static members of a static inner class can be referenced using the class name of the static inner  class.

public class Person {  private name;  public Person(String name) {  this.name = name;  }  public boolean equals(Object o) {  if( !o instanceof Person ) return false;  Person p = (Person) o;  return p.name.equals(this.name);  }  }  Which is true?() A、 Compilation fails because the hashCode method is not overridden.B、 A HashSet could contain multiple Person objects with the same name.C、 All Person objects will have the same hash code because the hashCode method is not overridden.D、 If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.

下面有关JVM内存,说法错误的是()。A、程序计数器是一个比较小的内存区域,用于指示当前线程所执行的字节码执行到了第几行,是线程隔离的B、Java方法执行内存模型,用于存储局部变量,操作数栈,动态链接,方法出口等信息,是线程隔离的C、方法区用于存储JVM加载的类信息、常量、静态变量、即使编译器编译后的代码等数据,是线程隔离的D、原则上讲,所有的对象都在堆区上分配内存,是线程之间共享的

JBuilder中包含多种文件,他们被放在不同的目录下,下面4种类型的文件描述中,哪种是错误的()A、编译后的java二进制码放在classes目录下B、java源文件放在scr目录下C、java程序运行时的工作目录就是工程所在目录,工作目录是指java程序运行时默认的当前目录D、编译中产生的obj临时文件和最终产生的可执行文件都放在Debug目录下

如何在面板中添加组件?()A、用框架对象的add函数将组件加到特定的面板中;B、将组件作为面板对象的一个成员变量;C、用组件的add函数添加;D、用面板对象的add好书添加;