网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
For an HttpServletResponse response,which two create a custom header?()
- A、response.setHeader("X-MyHeader", "34");
- B、response.addHeader("X-MyHeader", "34");
- C、response.setHeader(new HttpHeader("X-MyHeader", "34"));
- D、response.addHeader(new HttpHeader("X-MyHeader", "34"));
- E、response.addHeader(new ServletHeader("X-MyHeader", "34"));
参考答案
更多 “For an HttpServletResponse response,which two create a custom header?()A、response.setHeader("X-MyHeader", "34");B、response.addHeader("X-MyHeader", "34");C、response.setHeader(new HttpHeader("X-MyHeader", "34"));D、response.addHeader(new HttpHeader("X-MyHeader", "34"));E、response.addHeader(new ServletHeader("X-MyHeader", "34"));” 相关考题
考题
11. public enum Title { 12. MR(”Mr.”), MRS(”Mrs.”), MS(”Ms.”); 13. private final String title; 14. private Title(String t) { title = t; } 15. public String format(String last, String first) { 16. return title + “ “ + first + “ “ + last; 17. } 18. } 19. public static void main(String[] args) { 20. System.out.println(Title.MR.format(”Doe”, “John”)); 21. } What is the result?() A、 Mr. John DoeB、 An exception is thrown at runtime.C、 Compilation fails because of an error in line 12.D、 Compilation fails because of an error in line 15.E、 Compilation fails because of an error in line 20.
考题
int i = 0, j = 1; if ((i++ == 1) (j++ == 2)) { i = 42; } System.out.println(“i = “ + i + “, j = “ + j); What is the result?() A、 i = 1, j = 2B、 i = 1, j = 1C、 i = 42, j = 2D、 i = 42, j = 1E、 Compilation fails.
考题
You are designing an n-tier Java EE application. You have already decided that some of your JSPs willneed to get data from a Customer entity bean. You are trying to decide whether to use a Customer stubobject or a Transfer Object. Which two statements are true?()A、The stub will increase network traffic.B、The Transfer Object will decrease data staleness.C、The stub will increase the logic necessary in the JSPs.D、In both cases, the JSPs can use EL expressions to get data.E、Only the Transfer Object will need to use a Business Delegate.
考题
Which two are valid declarations of char?()A、 Char ch = “a”;B、 char ch = “”;C、 char ch = “café”;D、 char ch = “ucafe”;E、 char ch = “ucafe’;F、 char ch = “u10100’;G、 char ch = (char) true;
考题
public class Plant { private String name; public Plant(String name) { this.name = name; } public String getName() { return name; } } public class Tree extends Plant { public void growFruit() { } public void dropLeaves() { } } Which is true?() A、 The code will compile without changes.B、 The code will compile if public Tree() { Plant(); } is added to the Tree class.C、 The code will compile if public Plant() { Tree(); } is added to the Plant class.D、 The code will compile if public Plant() { this(”fern”); } is added to the Plant class.E、 The code will compile if public Plant() { Plant(”fern”); } is added to the Plant class.
考题
public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?() A、The program runs and prints “Hello”B、An error causes compilation to fail.C、The program runs and prints “Hello world!”D、The program runs but aborts with an exception.
热门标签
最新试卷