网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
Java IO和Java NIO有什么区别?
A.NIO提供了异步、无阻塞的IO,这对于编写速度更快、可伸缩的网络系统非常重要
B.基本I/O是阻塞的,当线程执行到read()或write()时,该线程被阻塞,直到有数据可读或数据写入结束,线程在此期间不能向下执行其他任务
C.NIO利用异步系统调用机制,借助选择器select()方法可以同时监视多个资源,轮询网络活动而不会阻塞
D.NIO选择器的轮询机制,实现了单线程管理多通道的工作模式
参考答案和解析
正确
更多 “Java IO和Java NIO有什么区别?A.NIO提供了异步、无阻塞的IO,这对于编写速度更快、可伸缩的网络系统非常重要B.基本I/O是阻塞的,当线程执行到read()或write()时,该线程被阻塞,直到有数据可读或数据写入结束,线程在此期间不能向下执行其他任务C.NIO利用异步系统调用机制,借助选择器select()方法可以同时监视多个资源,轮询网络活动而不会阻塞D.NIO选择器的轮询机制,实现了单线程管理多通道的工作模式” 相关考题
考题
在Java中,字符串由java.lang.String和( )定义。A.java. lang. StringCharB.java. lang.StringBufferC.java. io. StringCharD.java. io. StringBuffer
考题
Java 类库中,将信息写入内存的类是A ) java.io.FileOutputStreamB ) java.io.ByteArrayOutputStreamC ) java.io.BufferedOutputStreamD ) java.io.DataOutputStream
考题
在Java中,字符串由java.lang.String和( )定义。A.java.lang.StringCharB.java.lang.StringBufferC.java.io.StringCharD.java.io.StringBuffer
考题
WhichcanbeusedtodecodecharSforoutput?()
A.Java.io.InputStream.B.Java.io.EncodedReader.C.Java.io.InputStreamReader.D.Java.io.InputStreamWriter.E.Java.io.BufferedInputStream.
考题
Java类库中,将信息写入内存的类是( )。A.java.io.FileOutputStreamB.java.io.ByteArrayOutputStreamC.java.io.BufferedOutputStreamD.java.io.DataOutputStream
考题
下列哪个选项的java源文件代码片段是不正确的?A.package testpackage; public class Test{ }B.import java. io. *; package testpaekage; public class Test { }C.import java.io.*; class Person { } public class Test { }D.import java.io.*; import java. awt.*; public class Test{ }
考题
Java类库中,将信息写入内存的类是A.java.o.FileOutputstreamB.java.io.ByteArrayOutputStreamC.java.io.BufferedOutputstreamD.java.io.DalaOutputStream
考题
下列( )选项的java源文件代码片段是不正确的。A.package testpackage; publicClass Test{}B.import java.io.*; package testpackage: publicClass Test{}C.import java.io.*; Class Person{} publicClass Test{}D.import java.io.*; import java.awt.*; publicClass Test{}
考题
Java类库中,将信息写入内存的类是( )。A.java.io.FileOutputStreamB.java.io.ByteArrayOutputStreamC.java.io.BufferedOutputStreamD.j ava.io.DataOutputStream
考题
//point X public class foo ( public static void main (String[]args) throws Exception { printWriter out = new PrintWriter (new java.io.outputStreamWriter (System.out), true; out.printIn(“Hello”); } ) Which statement at PointX on line 1 allows this code to compile and run?() A、 Import java.io.PrintWriter;B、 Include java.io.PrintWriter;C、 Import java.io.OutputStreamWriter;D、 Include java.io.OutputStreamWriter;E、 No statement is needed.
考题
下面()接口是JavaBean必须实现的。A、java.lang.RunnableB、java.io.SerializableC、java.lang.ClonableD、java.beans.BeanInfo
考题
当需要在文件中写入字符而不是字节时,在下面的类中最好选用()类。A、java.io.RandomAccessFileB、java.io.PrintWriterC、java.io.PrintStreamD、java.io.PrintOutputStream
考题
//point X public class foo { public static void main (String[]args) throws Exception { java.io.printWriter out = new java.io.PrintWriter { new java.io.outputStreamWriter (System.out), true; out.printIn(“Hello”); } } } Which statement at PointX on line 1 allows this code to compile and run?() A、 Import java.io.*;B、 Include java.io.*;C、 Import java.io.PrintWriter;D、 Include java.io.PrintWriter;E、 No statement is needed.
考题
Which can be used to decode charS for output?() A、 Java.io.InputStream.B、 Java.io.EncodedReader.C、 Java.io.InputStreamReader.D、 Java.io.InputStreamWriter.E、 Java.io.BufferedInputStream.
考题
单选题Which can be used to decode charS for output?()A
Java.io.InputStream.B
Java.io.EncodedReader.C
Java.io.InputStreamReader.D
Java.io.InputStreamWriter.E
Java.io.BufferedInputStream.
考题
单选题Whichensp;canensp;beensp;usedensp;toensp;encodeensp;charSensp;forensp;output?()A
Java.io.OutputStream.B
Java.io.OutputStreamWriter.C
Java.io.EncodeOutputStream.D
Java.io.EncodeWriter.E
Java.io.BufferedOutputStream.
考题
单选题//point X public class foo { public static void main (String[]args) throws Exception { java.io.printWriter out = new java.io.PrintWriter { new java.io.outputStreamWriter (System.out), true; out.printIn(“Hello”); } } } Which statement at PointX on line 1 allows this code to compile and run?()A
Import java.io.*;B
Include java.io.*;C
Import java.io.PrintWriter;D
Include java.io.PrintWriter;E
No statement is needed.
考题
单选题//point X public class foo ( public static void main (Stringargs) throws Exception { printWriter out = new PrintWriter (new ) java.io.outputStreamWriter (System.out), true; out.printIn(“Hello”); } ) Which statement at PointX on line 1 allows this code to compile and run?()A
Import java.io.PrintWriter;B
Include java.io.PrintWriter;C
Import java.io.OutputStreamWriter;D
Include java.io.OutputStreamWriter;E
No statement is needed.
热门标签
最新试卷