-
-
-
-
-
-
-
-
fs.write (blk, 0, blk.length);
fs.close();
During writing a file I want use encoding like ISO-8859-1. I can't use Writer because my contents are byte stream. Same way I can't use BufferedOutputStream or DataOutputStream because its not supporting encoding. How do I solve this. Please help me. ">I have a file whose contents are written in french. I want to read that file and edit the file and then write the contents back to the same file. How do I do that?I am reading file content is instanceof ByteBlock only. Then I am using byte[] blk = ((ByteBlock) content).bytes();FileOutputStream fs = new FileOutputStream("a.txt");fs.write (blk, 0, blk.length);fs.close();During writing a file I want use encoding like ISO-8859-1. I can't use Writer because my contents are byte stream. Same way I can't use BufferedOutputStream or DataOutputStream because its not supporting encoding. How do I solve this. Please help me.
-
-
-
-
-
-
else if (month==3||month==4||month==5)
season = "spring";
else if (month==6||month==7||month==8)
season = "summer";
else if (month==9||month==10||month==11)
season = "autumn";
else
season = "bogus month";
System.out.println(season);
}
}">Although the output of following is spring, but how can we use the command line argument for the same program? pls solve thisthanks in advanceclass Ifelse{public static void main(String arr[]){int month=4;String season;if (month==12||month==1||month==2)season = "winter";else if (month==3||month==4||month==5)season = "spring";else if (month==6||month==7||month==8)season = "summer";else if (month==9||month==10||month==11)season = "autumn";elseseason = "bogus month";System.out.println(season);}}
-
-
-
-
-
-
Java Interview Questions
Ans