Saturday, September 5, 2009

SCJP Questions

What writes the text "" to the end of the file "file.txt"?
A. OutputStream out= new FileOutputStream ("file.txt"); Out.writeBytes ("/n");
B. OutputStream os= new FileOutputStream ("file.txt", true); DataOutputStream out = new
DataOutputStream(os); out.writeBytes ("/n");
C. OutputStream os= new FileOutputStream ("file.txt"); DataOutputStream out = new
DataOutputStream(os); out.writeBytes ("/n");
D. OutputStream os= new OutputStream ("file.txt", true); DataOutputStream out = new
DataOutputStream(os); out.writeBytes ("/n");
Answer: B

0 comments:

Post a Comment

 

About

Site Info

Information Source

Academy of JAVA by Rajesh Rolen Copyright © 2009 Community is Developed by Rajesh Kumar Rolen WebSite

/* tracking code by yahoo login */