Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Input and Output package

Have Programming Question? Ask it here!
 
 
 


Narender
Input and Output package
1 Answer(s)      2 years and 10 months ago
Posted in : Java Beginners


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.


Advertisement
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 And Output
to another file. This topic is related to the I/O (input/output) of java.io package... Input And Output       Introduction The Java I/O means Java Input/Output and is a part of java.io
Advertisements
input output
*; package, which is required for any input/output operations. Classes Defined.... This topic is related to the I/O (input/output) of java.io package. In this example... Input And Output      
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
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...; Output of the Program C:\nisha>javac CreateFile1.java C... will see a message as shown in the output. C:\nisha>javac
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
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
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 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
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
Dialog and Console Input-Output
Prev: Dialog Box Output | Next: Example: Captitalize Java NotesDialog and Console Input-Output  This is similar to the previous program, but it also gets input from the user. 1 2 3 4 5 6 7 8
Input - Output String Functions
Input - Output String Functions      ... a string data and input them directly into your database. Some special characters...); ?> Output: Actual string is:rose'india After adding slash it become:rose
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, 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
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
Console Input-Output (Java 5)
Java NotesConsole Input-Output (Java 5) Java 5's java.util.Scanner class... input. System.out.println("What's your name, Earthling?"); name... output System.out.println("Take me to your leader, " + name
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly. Thanks
package in java
package in java  when i run a package it give a error exception in thread "main" java.lang.NoClassDefFoundError what i do
package creation
package creation  program to create package having four different class in java
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
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: Entering... as a lower limit value, output comes: Entering the try block. Exiting the try block
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
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
Package in Applet
Package in Applet  How do I use this technique for applets
Java package
Java package  Which package is always imported by default
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
what will the output
= (Parent) sonu; p.play(); What will be the output of above section of code
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
Java package
Java package  What restrictions are placed on the location of a package statement within a source code file
Package in Servlet
Package in Servlet  How Create Package in Servlet ?   package packagename ; import java.io.*; import javax.servlet.*; import..."); PrintWriter out = response.getWriter(); out.println("Hello,Package Example
What is a package?
What is a package?  hi, What is a package? thanks   Hi, The Package is a mechanism for organizing the group of related files... programming language, A package is group of related types of classes & interfaces
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
Java.io package
Java.io package  List the names of various classes supported by Java.io package to handle character stream.   Reader and Writer classes and their subclasses
problem with package
problem with package  Dear sir, i have created one java file with package com.net; and i compiled the program.it showing the .class file... message as can not access package class methods
 

 

 

DMCA.com