网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下面类中属于字节I/O流的是()
- A、FileReader
- B、FileInputStream
- C、BufferedOutputStream
- D、BufferedWriter
参考答案
更多 “下面类中属于字节I/O流的是()A、FileReaderB、FileInputStreamC、BufferedOutputStreamD、BufferedWriter” 相关考题
考题
public class OuterClass { private double d1 1.0; //insert code here } You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()A、 static class InnerOne { public double methoda() {return d1;} }B、 static class InnerOne { static double methoda() {return d1;} }C、 private class InnerOne { public double methoda() {return d1;} }D、 protected class InnerOne { static double methoda() {return d1;} }E、 public abstract class InnerOne { public abstract double methoda(); }
考题
Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class?()A、 If the hashCode values are different, the objects might be equal.B、 If the hashCode values are the same, the object must be equal.C、 If the hashCode values are the same, the objects might be equal.D、 If the hashCode values are different, the objects must be unequal.
考题
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.
考题
import java.util.*; public class NameList { private List names = new ArrayList(); public synchronized void add(String name) { names.add(name); } public synchronized void printAll() { for (int i = 0; i System.out.print(names.get(i) +“ “); } } public static void main(String[] args) { final NameList sl = new NameList(); for(int i=0;i2;i++) { new Thread() { public void ruin() { sl.add(”A”); sl.add(”B”); sl.add(”C”); sl.printAll(); } }.start(); } } } Which two statements are true if this class is compiled and run?() A、 An exception may be thrown at runtime.B、 The code may run with no output, without exiting.C、The code may rum with output “A B A B C C “, then exit.D、The code may ruin with output “A A A B C A B C C “, then exit.E、 The code may rum with output “A B C A B C A B C “, then exit.F、The code may ruin with output “A B C A A B C A B C “, then exit.
考题
public class Test { public static void replaceJ(string text) { text.replace (‘j’, ‘l’); } public static void main(String args[]) { string text = new String (“java”) replaceJ(text); system.out.printIn(text); } } What is the result?() A、 The program prints “lava”B、 The program prints “java”C、 An error at line 7 causes compilation to fail.D、 Compilation succeeds but the program throws an exception.
考题
如果java.awt.Containerc的布局为BorderLayout,则c.add(newJbutton())的默认位置参数是()A、BorderLayout.EASTB、BorderLayout.WESTC、BorderLayout.CENTERD、编译错误
考题
Given classes defined in two different files: 1. package util; 2. public class BitUtils { 3. public static void process(byte[]) { /* more code here */ } 4. } 1. package app; 2. public class SomeApp { 3. public static void main(String[] args) { 4. byte[] bytes = new byte[256]; 5. // insert code here 6. } 7. } What is required at line 5 in class SomeApp to use the process method of BitUtils?() A、 process(bytes);B、 BitUtils.process(bytes);C、 util.BitUtils.process(bytes);D、 SomeApp cannot use methods in BitUtils.E、 import util.BitUtils.*; process(bytes);
热门标签
最新试卷