answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What package is imported when using bufferedreader class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Name the following-A package that is invoked by default?

The java.lang package is invoked by default by all Java classes. We need not import the classes inside the Java.lang package inside our class. They are automatically imported into all Java classes. Example: java.lang.String If you have to declare an array list the import statement import java.util.ArrayList; must be there in your class declaration. If this import is not present your code using the ArrayList would not compile or work But if you are going to use a String, you can directly use it because it would be automatically imported.


How do you import an entire package of class in java?

import package_name.*;where package_name is your package name.by using this syntax you can import an entire package.


What is package Explain steps to Create Package?

you intend to create a document using word processor package. explain the steps you will follow and the tools and features provided by the application you will apply


What is the use of BufferedReader in Java programming?

The BufferedReader class provides buffering to your Reader's. Buffering can speed up IO quite a bit. Rather than read one character at a time from the network or disk, you read a larger block at a time. This is typically much faster, especially for disk access and larger data amounts. The main difference between BufferedReader and BufferedInputStream is that Reader's work on characters (text), wheres InputStream's works on raw bytes. To add buffering to your Reader's simply wrap them in a BufferedReader. Here is how that looks: Reader input = new BufferedReader( new FileReader("c:\\data\\input-file.txt"));


How do you add a class or an interface to a package in java?

Well, the process differs whether you are using either an IDE or the command line binaries. If you are using an IDE, then it is most likely that your IDE comes with extensive functionality for both managing and creating packages. Look under the "Packages" menu, or, when you are using Eclipse, just right click on the package name in the Package Explorer window and a flood of possibilities will come right up. If you are using the command line binaries, then there are 2 steps to putting your classes in a package. First, you have to put your class or interface in the appropriate folder structure. For example, if you are using the package com.foo.bar.beebop, then you have to put your class in a folder named beebop, which is in a folder named bar, which is in a folder named foo, which is in a folder named com, which is in your class directory. Then, you have to add a package statement, which is only allowed to be at the top of your class file. For example, if you're using the package com.foo.bar.beebop, then put the following statement at the top of your class: package com.foo.bar.beebop; Then skip a line, then come your import statements (if you have any), then stick in another line (if you have inport statements), then your class. Enjoy!

Related questions

Is it possible to import package or class twice?

yes you can do that. The compiler does not complain about the fact that you imported a package or class more than once. However if you use an IDE like Eclipse it will tell you that you are using the same import multiple times. So remove it.


What is BufferedReader in Java Programming?

BufferedReader is a class used to read text from charater-input stream and buffering characters which reads characters, arrays, and new lines. In general, each read request made using "Reader" class, causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example, BufferedReader in = new BufferedReader(new FileReader("foo.in"));


A program using bufferedreader in quadratic equation?

doctor


Name the following-A package that is invoked by default?

The java.lang package is invoked by default by all Java classes. We need not import the classes inside the Java.lang package inside our class. They are automatically imported into all Java classes. Example: java.lang.String If you have to declare an array list the import statement import java.util.ArrayList; must be there in your class declaration. If this import is not present your code using the ArrayList would not compile or work But if you are going to use a String, you can directly use it because it would be automatically imported.


What is the difference between datainputstream and bufferedreader?

DataInputStream is used for reading primitive data types from an input stream, while BufferedReader is used for reading characters from a character-input stream and buffering the characters for efficient reading. DataInputStream is useful when reading binary data, while BufferedReader is more suitable for reading text data in a more optimized way.


How do you import an entire package of class in java?

import package_name.*;where package_name is your package name.by using this syntax you can import an entire package.


What is package Explain steps to Create Package?

you intend to create a document using word processor package. explain the steps you will follow and the tools and features provided by the application you will apply


Why we are not explicitly importing java.lang package?

Because, the java.lang package contains some of the most commonly used classes and utility functions of Java. As a result, almost all classes will be using some or all of those features. So, the creators of Java automatically imported this package in every class that you create to avoid the explicit import action for java developers


What is the use of BufferedReader in Java programming?

The BufferedReader class provides buffering to your Reader's. Buffering can speed up IO quite a bit. Rather than read one character at a time from the network or disk, you read a larger block at a time. This is typically much faster, especially for disk access and larger data amounts. The main difference between BufferedReader and BufferedInputStream is that Reader's work on characters (text), wheres InputStream's works on raw bytes. To add buffering to your Reader's simply wrap them in a BufferedReader. Here is how that looks: Reader input = new BufferedReader( new FileReader("c:\\data\\input-file.txt"));


How do you add a class or an interface to a package in java?

Well, the process differs whether you are using either an IDE or the command line binaries. If you are using an IDE, then it is most likely that your IDE comes with extensive functionality for both managing and creating packages. Look under the "Packages" menu, or, when you are using Eclipse, just right click on the package name in the Package Explorer window and a flood of possibilities will come right up. If you are using the command line binaries, then there are 2 steps to putting your classes in a package. First, you have to put your class or interface in the appropriate folder structure. For example, if you are using the package com.foo.bar.beebop, then you have to put your class in a folder named beebop, which is in a folder named bar, which is in a folder named foo, which is in a folder named com, which is in your class directory. Then, you have to add a package statement, which is only allowed to be at the top of your class file. For example, if you're using the package com.foo.bar.beebop, then put the following statement at the top of your class: package com.foo.bar.beebop; Then skip a line, then come your import statements (if you have any), then stick in another line (if you have inport statements), then your class. Enjoy!


List two methods to import java packages?

Java packages can be imported using the import key word in java. There are two ways of importing java programs. 1. you can import the class along with the fully classified class name. Ex: import java.lang.String; 2. you can import all classes in a package using the star symbol. Ex: import java.lang.*;


What is BufferedReader in java?

in java buffering is used for handling i/o streamswhen you use an unbuffered stream the data is directly transferred from the source to whatever.when you use buffered stream the data is taken from the source and placed into something like a holding area. then the information can be taken from this holding area at will which makes buffered streams more efficient.for example when you load a vid on youtube once part of it loads you can use play anypart of the loaded vid. that's not exactly how it works but it gives you a general sense.