Question: ask



Share on Google+Share on Google+

1 Answer(s)      8 years ago
Posted in : Java Beginners
View Answers

January 5, 2009 at 11:20 PM

Hi friend,

Please explain properly requirement. I am sending simple code according to your requirement.


public class FileRead {
public static void main(String args[]) {

FileInputStream fstream = new FileInputStream("/home/vinod/amarexamples/file2.txt");
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
// Print the content on the console
System.out.println (strLine);
//Close the input stream
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());


Visit for more information.




Related Tutorials/Questions & Answers:
Ask for latest version for hibernate
Ask for latest version for hibernate  any new version for hibernate after 3.0, if yes can u give some exmp for latest version of hibernate
Ask about java
Ask about java  Create a java program for add and remove the details of a person, which is not using by database, a simply java program. If possible, please wil it in switch case
Ask about looping in database
Ask about looping in database  Good afternoon, I want to ask something, Now i have 2 tables,name of the table is RULE and Heritage. Table heritage...=True,A2=True : code is the same data Rule and Heritage. I want to ask
ask java - Date Calendar
ask java  sory i'am wrong language. i want to ask to this forum how to take calender to another frame. now we can find like "datapicker" in VB but in java i found too but i can't to join in another frame. And i want to ask how
Ask java count
Ask java count  Good morning, I have a case where there are tables sumborrowbook fieldnya: codebook, bookname, and sumborrowbook . I want to make the results: for example: | code book | name of book | sum | | b001
ask - Java Beginners
ask   dear how to "print out" into a file ? regard suhadi  Hi friend, Please explain properly requirement. I am sending simple code according to your requirement. import*; public class
Ask date difference
Ask date difference  Hello, I have a problem about how to calculate date, the result from this code is not complete , this is my code . please help me. thank you public void a(){ String date1 = jTextField33.getText(); String
ask a user to enter 5 integer
ask a user to enter 5 integer  make a program that enter 5 numbers then identify the largest and the smallest number sample program 2 4 3 5 6 the smallest number: 2 the largest number: is 6 66
Ask Questions
Ask Questions      ..., professions, students and learners, we have initiated a new service ‘Ask Question’. Using this new service, our visitors can ask any sort of question
How to ask a questions to you clearly with normal english?
How to ask a questions to you clearly with normal english?  hi, i want to know how should or can i may ask a question. send me some format... in the same way as you have asked this question. Go to the Ask Questions part
ask how function jCalender - Date Calendar
ask how function jCalender  d, Halo friend, i want to ask how to make this script can run and call JCalender. I want to know how to make private this code.i has already insert plugin in my netbeans. try
Ask JSP questions online
Ask JSP questions online       Facing problem in JSP? Ask to us, we... has just started a new problem solving service ‘ask question’. In our
How many qusetions can you ask?
How many qusetions can you ask?  Hi I was very impressed following my very first question I asked regarding some coding. However I am not sure why any further questions have not yet been answered. Is this because they are more
Ask Applet Questions Online
Ask Applet Questions Online   ... ‘Ask Questions’. Now, you can get the quick answers of your questions... service of ‘Ask Questions’ has given you the tool to resolve your
Ask Questions with Options
Ask Questions with Options using Java In this section, we are going to ask five questions one after the other with four options to test the user. For this, we have stored 5 questions, answers with four options into a list. The list
Ask PHP Questions
Ask PHP Questions       PHP Questions and Answers Ask PHP Questions and get answers from.... In your questions and answers section you can ask PHP questions and get
Ask Servlet questions online
Ask Servlet questions online       Feel free to ask any question about servlets... kicked off a new service ‘ask questions’ to resolve your query
Ask Java Questions Online
Ask Java Questions Online   ... Developer Company has just begun a new service ‘ask question online’ to resolve your query. Through using this service, you can ask
Ask make graph from i report and view to java Language Programming
Ask make graph from i report and view to java Language Programming  Dear sir, Please help me, i want to make a graph from mysql to i report and view to java. Please help me, give me example source code please. thank you
want to ask how to update data for runtime selected multiple checkboxes
want to ask how to update data for runtime selected multiple checkboxes  HI I have one problem I have fetched value from oracle database into grid and created runtime textboxes in the grid for the column geocoordsN,GeocoordsE I
ask user how many numbers to be inputted and determine the sum and highest number using an array in java
ask user how many numbers to be inputted and determine the sum and highest number using an array in java  ask user how many numbers to be inputted and determine the sum and highest number using an array in java
Ask VoIP Questions Online
Ask VoIP Questions Online   ... international calls. Ask questions to know about VoIP, or if you are facing any problem in VoIP technology, ask to us freely. Our VoIP experts
Ask Hibernate Questions Online
Ask Hibernate Questions Online   .... Feel free to ask questions on Hibernate related problems. In the move of providing you better service, we have launched a new section ‘Ask
Ask JDBC question online
Ask JDBC question online   ...-answer service ‘Ask Question in JDBC’ for all our visitors. Now you... to ask the questions from us and deploy the solution on your project
Ask iBatis Questions Online
Ask iBatis Questions Online   ... relating to programming, coding, implementing and using. Ask any iBatis question using our new service ‘Ask iBatis Questions Online’ and get
Ask Maven Questions Online
Ask Maven Questions Online   ... defined tasks such as compilation of code and its packaging. Ask any... ‘Ask Maven Questions Online’ and ease your stress. For your
Ask JEE Questions Online
Ask JEE Questions Online   ... Edition. In the latest trend, it is famous as JEE. Ask any question... or uses of J2EE. You can ask any J2EE questions online and get the most accurate
Ask SOA Questions Online
Ask SOA Questions Online   ... business tasks, or services. Ask questions pertaining to SOA by posting your query on our new services ‘Ask Questions SOA Online&rsquo
Ask EJB Questions online
Ask EJB Questions online   ... have started a new service ‘ask question on EJB online&rsquo... of enterprise applications. View and ask questions at http
Ask JavaFX Questions Online
Ask JavaFX Questions Online       Ask programming questions related to the JavaFX development. Ask if you have query about JavaFX. With the help
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?


Advertisement null