Groups
Groups
Sign in
Groups
Groups
Pune Java Puzzles
Conversations
About
Send feedback
Help
What is wrong with following program
0 views
Skip to first unread message
Rohit Ghatol
unread,
Dec 18, 2007, 1:16:21 PM
12/18/07
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pune Java Puzzles
Could you find out what is wrong with following program?
Also once you find out, what would be the fix?
public class Logger{
public void log(String message) throws IOException{
try{
FileOutputStream log1Stream=.........
FileOutputStream log2Stream=.........
log1Stream.write(......);
log2Stream.write(......);
}
finally{
if(log1Stream!=null){
log1Stream.close();
}
if(log2Stream!=null){
log2Stream.close();
}
}
}
}
Rohit Ghatol
unread,
Dec 18, 2007, 2:10:20 PM
12/18/07
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pune Java Puzzles
Let me correct a simple typo error first then you all can start on
this problem
public class Logger{
public void log(String message) throws IOException{
FileOutputStream log1Stream=.........
FileOutputStream log2Stream=.........
try{
Reply all
Reply to author
Forward
0 new messages