Which constructs a BufferedIputStream?()A、 New BufferedInputStream(“in.txt”);B、 New BufferedInputStream(new File(“in.txt”));C、 New BufferedInputStream(Writer(“in.txt”));D、 New BufferedInputStream(new Writer(“in.txt”));E、 New BufferedInputStream(new InputStream(“in.txt”));F、 New BufferedInputStream(new FileInputStream(“in.txt”));

Which constructs a BufferedIputStream?()

  • A、 New BufferedInputStream(“in.txt”);
  • B、 New BufferedInputStream(new File(“in.txt”));
  • C、 New BufferedInputStream(Writer(“in.txt”));
  • D、 New BufferedInputStream(new Writer(“in.txt”));
  • E、 New BufferedInputStream(new InputStream(“in.txt”));
  • F、 New BufferedInputStream(new FileInputStream(“in.txt”));

相关考题:

通过Ajax,客户端获取的数据主要有两种类型:文本型和()

下面哪个语句是正确的()A、short s=256;B、String s=‘Helloworld’;C、int x=012;D、char c=“a”;

Less Test{    public static void main(String[] args){   for(int x=0;x7;++x){  int y=2;   x=++y;   }   System.out.println(“y=”+y);   }   }   结果为:()  A、y=5B、y=6C、 y=7D、y=8E、编译失败F、运行时异常被抛出

现有:  1.  interface Animal  f      2.    void eat();      3.    }      4.  5.  // insert code here      6.  7. public class HouseCat implements Feline  {      8.    public void eat()    {  }     9.  }  和以下三个接口声明:  interface Feline extends Animal  (  )  interface Feline extends Animal  {void eat();    }  interface Feline extends Animal  {void eat()    {  }  }   分别插入到第5行,有多少行可以编译?   A、  0B、  1C、  2D、  3

interface DeclareStuff{  public static final int EASY = 3;  void doStuff(int t); }  public class TestDeclare implements DeclareStuff {  public static void main(String [] args) {  int x=5;  new TestDeclare().doStuff(++x);  }  void doStuff(int s) {  s += EASY + ++s;  System.out.println(”s “ + s);  }  }  What is the result?() A、 s 14B、 s 16C、 s 10D、 Compilation fails.E、 An exception is thrown at runtime.

Which two security mechanisms protect the response stream?()A、 authorizationB、 data integrityC、 confidentialityD、 authentication

class TestReference{   public static void main(String[] args){   int x=2;   TestReference tr = new TestReference();   System.out.print(x);   tr.change(x);   System.out.print(x);  }   public void change(int num){   num = num + 1;  }  }   程序运行后的输出是哪项()?  A、 23B、 21C、 22D、 编译错误

public class Test {  public static void main (String[]args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.printIn(“baz = ” + baz);  }  }  And the output:  Baz = 2  Which command line invocation will produce the output?()  A、 Java Test 2222B、 Java Test 1 2 3 4C、 Java Test 4 2 4 2D、 Java Test 4 3 2 1

volatile关键字的说法错误的是()。A、能保证线程安全B、volatile关键字用在多线程同步中,可保证读取的可见性C、JVM保证从主内存加载到线程工作内存的值是最新的D、volatile能禁止进行指令重排序

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.

Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. private static void process(byte[] b) { }  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、 app.BitUtils.process(bytes);D、 util.BitUtils.process(bytes);E、 import util.BitUtils. *; process(bytes);F、 SomeApp cannot use the process method in BitUtils.