Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Sazzad Hossain

Greenhorn
+ Follow
since Jul 21, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sazzad Hossain

Hello,
I have a SCJP 5.0 voucher to sell which is expiring on August 2009. This voucher is good for US and Canada. I bought it USD300. I am going to be quite busy with my project work and I doubt I will be able to manage time for preparation and sit for the exam. If anyone interesed, I will give it at 250USD. I bought it from SUN website and have invoices with it. Any serious buyer email me at hisazzad@hotmail.com.
Thanks
13 years ago
Hi I have a SCJP exam voucher for sell expiring August 2009.If anyone interested email me at hisazzad@hotmail.com
Thanks
13 years ago
Make sense. Thanks a lot for clarification
Thanks Naveen..Now its clear to me.
To Raphael Rabadan
Does it mean casting is not possible if there is no is-a relationship in two classes?
Hi,
I lost the CD that comes with the K&B SCJP 5 study guide. Is there any way that i can get it? Please help.
To Mamadou Tour´┐Ż
Thanks a lot. The way you explained it make total sense to me.
Hi Deepak

From my understanding you are right. total 5 objects will be created. the toString() method will return the object itself. It will not creat any new object according to sun api.
The reason its not compiling is because you are missing the "{" and "}" in your code.
Hi,
Just adding the line fw.flush() before opening the second FileWriter gave me the expected output.

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class FileWriterTest {

public static void main(String[] args) {

try{
char[] arr = {'c','a','b','d','e','f'};
File f = new File("C:\\_develop\\Test.txt");
FileWriter fw = new FileWriter(f);
fw.write('f');
fw.write(97);
fw.write("arath",1,3);
fw.write(arr,1,5);
fw.flush(); // Add this line
System.out.println(fw.getEncoding());
FileWriter fw1=new FileWriter(f,true);
fw1.write("vana",1,3);
fw1.flush();
fw1.close();
fw.close();
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}

}

Hope this help.