Core Java, Made Simple by Som Prakash Rai

Core Java, Made Simple by Som Prakash Rai

Author:Som Prakash Rai [Rai, Som Prakash]
Language: eng
Format: epub
ISBN: 9789386551979
Publisher: BPB Publications
Published: 2018-08-15T00:00:00+00:00


More examples

import java.io.*;

public class Jtc111{

public static void main(String arg[]){

System.out.println(“in main”);

try(FileOutputStream fos=new FileOutputStream(“abc.txt”);

BufferedOutputStream bos=new BufferedOutputStream(fos);

DataOutputStream dos=new DataOutputStream(bos))

{

dos.writeUTF(“HELLO JTC”);

}

catch(Exception e){

e.printStackTrace();

}

}

}

import java.io.*;

public class Jtc112{

public static void main(String arg[]){

FileOutputStream fos=null;

BufferedOutputStream bos=null;

DataOutputStream dos=null;

try{

fos=new FileOutputStream(“abc.txt”);

bos=new BufferedOutputStream(fos);

dos=new DataOutputStream(bos);

dos.writeUTF(“HELLO JTC STUDENTS”);

}

catch(Exception e){

e.printStackTrace();

}

finally{

try{

fos.close();

bos.close();

dos.close();

}

catch(Exception e){

}}}}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.