网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
Which of the following answer is correct to express the value 8 in octal number?()
- A、 010
- B、 0x10
- C、 08
- D、 0x8
参考答案
更多 “Which of the following answer is correct to express the value 8 in octal number?() A、 010B、 0x10C、 08D、 0x8” 相关考题
考题
要产生一个动作监听器类,需要实现什么接口?()A、OnActionPerformed接口;B、ActionEvent接口;C、OnEventAction接口;D、ActionListener接口;
考题
public static void parse(String str) { try { float f= Float.parseFloat(str); } catch (NumberFormatException nfe) { f= 0; } finally { System.out.println(f); } } public static void main(String[] args) { parse(”invalid”); } What is the result?() A、 0.0B、 Compilation fails.C、 A ParseException is thrown by the parse method at runtime.D、 A NumberFormatException is thrown by the parse method at runtime.
考题
import java.util.*; class Banana3 { public static void main(String [] args) { int x = 2; Banana3 b = new Banana3(); b.go(x); } static { x += x; } void go(int x) { ++x; System.out.println(x); } } 结果为:() A、2B、3C、5D、编译失败
考题
字符串的append函数可以添加多种内容,以下append函数的使用中,错误的是() StringBuffer strb1 = new StringBuffer(); Integer intObj = new Integer(33);A、strb1.append(3.14159);B、strb1.append(’数’);C、strb1.append(true);D、strb1.append(intObj);
考题
Which interface must a class implement to be informed of a session creation event?()A、 javax.servlet.http.HttpSessionListenerB、 javax.servlet.http.HttpSessionBindingListenerC、 javax.servlet.http.HttpSessionCreationListenerD、 javax.servlet.http.HttpSessionActivationListener
考题
class Foo { public static void main(String [] args) { int x = 0; int y = 4; for(int z=0; z 〈 3; z++, x++) { if(x 〉 1 ++y 〈 10) y++; } System.out.println(y); } } 结果是什么?() A、6B、7C、8D、10
考题
现有: - f 是一个对 java.io.File 实例的合法引用 - fw 是一个对 java.io.FileWriter 实例的合法引用 - bw 是一个对 java.io.BufferedWriter 实例的合法引用 以下哪一项无效?() A、 PrintWriter prtWtr = new PrintWriter(f);B、 PrintWriter prtWtr = new PrintWriter(fw);C、 PrintWriter prtWtr = new PrintWriter(bw);D、 BufferWriter bufWtr = new BufferedWriter(f);E、 BufferWriter bufWtr = new BufferedWriter(fw);F、 BufferWriter bufWtr = new BufferedWriter(bw);
考题
2. public class Foo implements Runnable ( 3. public void run (Thread t) { 4. system.out.printIn(“Running.”); 5. } 6. public static void main (String[] args) { 7. new thread (new Foo()).start(); 8. ) 9. ) What is the result?() A、 An exception is thrown.B、 The program exists without printing anything.C、 An error at line 1 causes compilation to fail.D、 An error at line 6 causes the compilation to fail.E、 “Running” is printed and the program exits.
考题
A Company.com developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal?()A、 Store the data in a local variable.B、 Store the data in an instance variable.C、 Store the data in the HttpSession object.D、 Store the data in the ServletContext object.E、 Store the data in the ServletRequest object.
热门标签
最新试卷