Input and Output package

Input and Output package

Hi guys, My professor used input and output statements in a different way.. She didnt used System.out.println(); instead she used in.readint() out.writeln() commands to read input and print output. she created two new objects directly to use this statements.

/* input and output objects */ input in = new input(); output out = new output();

When I am using this, it is showing an error."cannot find symbol..input" So,i want to know the header file which gives me the access to this read and writeln statements directly.

or

is there any other solution for this???

Thank you.

View Answers

October 24, 2011 at 11:10 AM

import java.io.*;
class InputOutput 
{
    public static void main(String[] args) throws Exception 
    {
        BufferedReader br=new BufferedReader(new FileReader("data.txt"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("new.txt"));

        String st="";
        while((st=br.readLine())!=null){
            bw.write(st);
            bw.newLine();
        }
        bw.close();
    }
}

For more information, visit the following link:

Java IO package









Related Tutorials/Questions & Answers:
Input and Output package
Input and Output package  Hi guys, My professor used input and output... she used in.readint() out.writeln() commands to read input and print output. she created two new objects directly to use this statements. /* input and output
input output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part... for any input/output operations. Classes Defined in the program: OnlyExt
Advertisements
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
Data input & output Stream
Data input & output Stream  Explain Data Input Stream and Data Output Stream Class.   DataInputStream and DataOutputStream A data input stream lets an application read primitive Java data types from an underlying input
Working With File,Java Input,Java Input Output,Java Inputstream,Java io Tutorial,Java io package,Java io example
files using the File class. This class is available in the java.lang package... to the current location. ADS_TO_REPLACE_3 Output of the Program C... in the output. C:\nisha>javac CreateFile1.java C:\nisha>
Java Input/Output Examples
Java Input/Output Examples In this tutorial you will learn about how the Inputs and outputs are managed in java. To understand the Java Input & Output... and interfaces to handle the system input & output through data streams
input output in java
input output in java  java program using filereader and filewriter   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args) throws
Input / Output in Easiest Method in Java
Input / Output in Easiest Method in Java  How to input from keyboard, both strings and characters and display the result on the screen...)throws Exception{ Scanner input=new Scanner(System.in
Input and Output problems - Java Beginners
Input and Output problems  1) what is Difference between InputStreamReader and FileReader? 2) what is buffer?   Hi friend... to a particular platform. Thus, this class reads characters from a byte input stream
ModuleNotFoundError: No module named 'output_package'
ModuleNotFoundError: No module named 'output_package'  Hi, My... named 'output_package' How to remove the ModuleNotFoundError: No module named 'output_package' error? Thanks   Hi, In your python
counting the values in input file and and writing the output to a file
counting the values in input file and and writing the output to a file ... it should write the output to a file. Input file has 20 rows and 4 columns. If we...-code/16483-counting-values-input-file-writing-output-file.html this code
Input - Output String Functions
Input - Output String Functions      ... a string data and input them directly into your database. Some special characters...;;ADS_TO_REPLACE_3 echo stripslashes($str); ?> Output:ADS_TO_REPLACE_4
output
output  Sir,I am experiencing some problems with the output of this program.I got some useful help this website,but the output of the program isn't producing what it should.let me explain the output below is what happen when
input
input  a java program that will exchange the last names of two students that were input by a user
Package
Package  Create a Package named com.example.code. Write few classes, interface and abstract classes. Now create a class names PackageDemo that uses the classes of this package from other package
Package
Package  Create a Package named com.example.code. Write few classes, interface and abstract classes. Now create a class names PackageDemo that uses the classes of this package from other package
package:
package:  i hv created created a package and save it into D... in a package world. The we specify the keyword package with the name of the package. package world; public class HelloWorld { public static void main(String
package:
package:  i hv created created a package and save it into D... in a package world. The we specify the keyword package with the name of the package. package world; public class HelloWorld { public static void main(String
package
package  by what name we can save a java file that contain a package {i.e package p;} and several public classes {i.e public class abc} but not a main method
package
package  hello, What is a package?   hello,ADS_TO_REPLACE_1 To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability
package
can allow types in one package to have unrestricted access to one another, still restricting the access for the types outside the package
package
package  write a package for games which have two classes indoor... specifier and also use the finalize() method   We have created a package... class, we have imported this package and using a function display(), we have
package
package  Smith has created a package named ApplianceDetails that contains the Appliance class.Now he wants to create a class named NewAppliance that stores the details of the newly launched appliances.He uses the following syntax
package
package  Smith has created a package named ApplianceDetails that contains the Appliance class.Now he wants to create a class named NewAppliance that stores the details of the newly launched appliances.He uses the following syntax
output error
]; for (k=0;k } } if i enter "my name" as the input the output...output error  this is my program import java.io.*; public class separate { public static void main(String[] args)throws IOException
input box
input box  give me the code of input box in core java
input box
input box  give me the code of input box in core java
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
Output of flex
Output of flex  hi....... please provide the name of the output file. What is the output of flex applications? please rply ASAP........ Thanks
triangle output
triangle output  program to get the following output
output variable
output variable  if i want to print output of three variables when i wrote the code e.g SYStem.out.PRINTln(answer + answer1 + answer 2) only output of answer is getting printed out? can you help
Array and input
to input one of the above numbers then i want to print the array without the number user input. how will i do tht
Mysql Date Input
;Output : The input : 3-Jan-2008 The output : 2008-01-03... Mysql Date Input       Mysql Date Input is used to give the input date and convert the input
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly.ADS_TO_REPLACE_1 Thanks
What is the output if....
What is the output if....  Here is my code. what is the output...;When we put 50 as a lower limit value, output comes: (adsbygoogle... violation. After the catch block When we put 150 as a lower limit value, output
What will be the Output?
What will be the Output?  int[] number = {5,3,6,10,1} int temp; for (int i=0; inumbers[j]) { temp=numbers[i]; numbers[i]=numbers[j] number[j]=temp
output of the program
output of the program  public static int sum(List list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasNext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; } return sum
keyboard input
keyboard input  how do I use JOptionPane to accept keyboard input? I know how to import but not specific command on input line   import javax.swing.*; class JOPtionPaneExample { public static void main(String
xml output
xml output  generate an xml output in the following format <FileCount> <DOC>AA <RTF>BB <PDF>CC <Total>DD where AA=total number of .DOC files found BB=total number of .RTF files found,etc
what is the output?
what is the output?  public class MyAr{ public static void main(String argv[]) { int[] i=new int[5]; System.out.println(i[5]); } }   It gives ArrayIndexOutOfBoundsException as you haven't add element to array. Correct
what will the output
= (Parent) sonu; p.play(); What will be the output of above section of code
Java I/O Examples
Java Input/Output. It is provided by the java.io package. This package has... the Java IO Standard Input through Command Line. Command Line Standard Output... provided by the java.io package shown in the given table.  
Java Command Line Input
this code you will find the output as Please Input A Number 2 data is- 2...Java Command Line Input  How to get input from command line in java... System.out.println("Please Input A Number"); BufferedReader br
Creating custom output using XMLUnit - MatchTracker duplicates the output data
in input xml and I am having duplicate data in output...Creating custom output using XMLUnit - MatchTracker duplicates the output data  how to create a custom output using xmlunit, I have tried it and used
store input and display previous input as well current input. in jsp
store input and display previous input as well current input. in jsp  Hi Friend, In this JSP program i want display the previous input as well current inputs also. currently only current input i am able to display whenever i
How to create an input box?
How to create an input box?  How to create an input box
I/O Program output error
I/O Program output error  Hello All, I am working on a program that requries me to read and analyze a .txt file and output the results to a .txt file, but I am getting incorrect output. I have been successfull with part
escaping user input in php
escaping user input in php  Is it possible to escape the user input while submitting data into database in PHP

Ads