Basic File handling program in java with Output/input Stream

abhas at 13h14
27
Jun
2009
Basic File handling program in java with Output/input Stream

import java.io.*;


class fileH
{
public static void main(String args[])throws IOException
{
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in));

System.out.println("Enter a number of elements");
int n=Integer.parseInt(obj.readLine());

FileOutputStream fos=new FileOutputStream("Stu.dat");
DataO
About
This topic belongs to the forum
  • Numbers of topics : 1431
  • Numbers of messages : 8652
  • Numbers of users : 6367
  • Numbers of points : 103
Similar topics
class out { void main() { int a=1; switch(a) { case '1': { System.out.print("ONE\n"); break;} case '2':
class Str { public static void main(String args[]) { String a[]=new String[1]; System.out.println(a[0]); } } ====================================================== remember the output of this program is:- null if u run this prg in bluej
Look the example carefully--Code:import import java.util.InputMismatchException; import java.util.Scanner;   public class DivideByZeroNoExceptionHandling{                // demonstrates throwing an exception when a divide-by-zero
I have faced a problem in java program. That is how can i get input in an array in java. just like this: in an array[3], a[0]='a', a[1]='b', and a[2]='c'; please help me by giving the solution.
Find output of this JAVA program class out1 { public static void main(String args[]) { int s=0,i=0; while(i++<5) { System.out.println(i); s+=i; } int value=5; if (value++ == 6) System.out.println("six"); else if
Forums from same category
  • USMLE Forum USMLE STEP 123 Medical Books PG Entrance Exams

  • Free forum : AIEEENOW provides you a platform where you can discuss all your queries related to AIEEE, IIT and others amongst yourself. Counselling Experts would also guide you in counselling from tim

  • Where we can talk freely with normal people.

  • Free forum : I am a third year undergraduate student of IIT Kharagpur. The purpose behind making this forum is to bring all the IAS aspirants at one platform where they can share their study tips and

  • Discusess all about ibpsexam preparation tips po's and Clerk

  • IT INCLUDE EACH AND EVERY ASPECT OF THE INTERNET ABOUT WHICH YOU WANT AND INFORMATION AND WANT TO SHARE KNOWLEDGE.

See also
more_less
Informations

0 Replies For the topic :
"Basic File handling program in java with Output/input Stream"

This topic has been viewed 2068 times.

Last message :
27/06/2009 at 13h14 by "abhas"