1. Reading text file in J2ME stackoverflow.comI'm trying to read a resource (asdf.txt), but if the file is bigger than 5000 bytes, (for example) 4700 pieces of null-character inserted to the end of the content variable. Is ... |
2. What is the fastest method for reading from a text file in Java? stackoverflow.comI currently use:
Is there a faster way?
|
3. Reading a text file in java stackoverflow.comHow would I read a .txt file in Java and put every line in an array when every lines contains integers, strings, and doubles? And every line has different amounts of ... |
4. Read text file in Java stackoverflow.comI have a text file. I would like to retrieve the content from one line to another line. For example, the file may be 200K lines. I want to read the ... |
5. Reading a text file in Java stackoverflow.comI want to read a text file containing space sepearted values. Values are integers. How can I read it and put it in an array list? Here is an example of contents of ... |
6. I want to read a big text file stackoverflow.comI want to read a big text file, what i decided to create four threads and read 25% of file by each one. and then join them. but its not more impressive. can any ... |
7. proper file path of a text file to read stackoverflow.comI want to manipulate a file in my java program.The file to read must be paralled to my src folder. What should I give as file path? |
8. Read and process big text file in Java? stackoverflow.comHi all I want to read a very big text file(a log file of a web app)and do some processing. Is there any Framework to help doing such work ? The file is 100M+,shall ... |
9. How to read text file from relative path in a project? stackoverflow.comi have project with 2 package - tkorg.idrs.core.searchengines (1) - tkorg.idrs.core.searchengines (2) In packge (2) i have text file ListStopWords.txt, in packge (1) i have class FileLoadder Here is code in FileLoadder: File file ... |
10. how to read a text file stored in mobile using j2me midp2.0? stackoverflow.comHI ALL, I am working in j2me midp2.0 environment.My application wants to read a text file which is stored in mobile device.How to read the text file programatically using j2me.Please give me ... |
11. read text from file containing escape characters to compile time equivalent stackoverflow.comI would like to parse a text file or a java property which contains text such as: "test\n123\t456" to the equivalent if it were written in String test = "test\n123\t456"; i.e. I want the ... |
12. "Best" way to read a text file stackoverflow.comPlease excuse my ignorance, I am new to Java, trying to learn from my mistakes as I write a simple programme. It seems there are a few different ways to read ... |
13. Java read a file, if it doesn't exist create it stackoverflow.com
|
14. Java - Read text file by chunks stackoverflow.comI want to read a log file in different chunks to make it multi threaded. The application is going to run in a serverside environment with multiple hard disks. After reading into ... |
15. Read text file in java stackoverflow.comHey, I need to read a textfile in java. The problem is that the file has the following format:
I need to be able to ... |
16. Confusion with J2me reading file. Please Help me understand stackoverflow.comI am working on a J2ME app for Symbian S60 phones where reading from a text file is required. I have no access to BufferedReader to extract a line of ... |
17. Java read values from text file stackoverflow.comI am new to Java. I have one text file with below content. `trace` - structure( list( "a" = structure(c(0.748701,0.243802,0.227221,0.752231,0.261118,0.263976,1.19737,0.22047,0.222584,0.835411)), "b" = structure(c(1.4019,0.486955,-0.127144,0.642778,0.379787,-0.105249,1.0063,0.613083,-0.165703,0.695775)) ) )Now what I ... |
18. how to read the given text file stackoverflow.commy text file is(sample1.txt): contig00001 length=586 numreads=4 CGGGAAATTATCcGCGCCTTCACCGCCGCCGGTTCCACCGACGAACGGATACTGCGtGaa ggCCGCGATCCCGTCggaCGGAAAaCGCCcTGGCCCGGGAaCATACCGTTCGGGCCGCCA AGTGTTATAGCCGGACCACTTGTCAGAACATTTCCaaTCCGAAGATGTGAGTtCGGAAGg TAAAAGCCCGACAAGTTGCGCGgTGAATTTACCTTtACcGCACGATATGCGTCCGTATTA AaGAAAaGTTCGAAATTATCAGTAAGGCCGACCTGAAaGCTGACCGGGAGTTCAACAAAA TCTGCATCACCcGGgTCACGGTCGAAATTGCTGTACGCGGCGCTGAACGTAAATTCACCC TTTcTAAGGGTGTCGCcGTCGTAAACCGTAAaCAaGCCGGTAGCGCCGCCCATCGGGCCG CCGGTACCAACCGTCGGTGCCGTGTTTCTtGCATCATTGTCCGATCGAGCGTTCTCGTCC GCTTGTGCAAaTCCTGCAaTAGCTAACGTGAAAACGATCAGAGCTGTTGTAAATACTCTA TAAGCGAGATTCATCACATTCCTCcGCCGAAATAAAAAGTTAATTt ... |
19. How to read a text file directly from Internet using Java? stackoverflow.comHey I am trying to read some words from an online text file. How do I do it? I tried doing something like this
|
20. Reading/Opening a text file in Java stackoverflow.comI know that there are probably hundreds of posts dealing with this exact question, but for the life of me, I cannot figure anything out. I have this "Open" case in ... |
21. Java - what is usual practice for simple reading from text files? stackoverflow.comI'm messing about with Java, after a long hiatus, and I'm running into my usual problems with its complexity. I have what should be a simple problem, but what with InputStreams, InputReaders, ... |
22. text file reading stackoverflow.comThis article has tips on reading text files. But I want firstly to read the whole file. Then I want to create a string through |
23. Reading a text file gives unexpected results stackoverflow.comI have a text file with the following contents:
I am reading it with the following code:
|
24. Double while loop to read a text file stackoverflow.comIs it possible to read a text file with a double while/for loop? I'd like to do something like this:
|
25. Reading in from text file character by character stackoverflow.comIn Java, is there a way of reading a file (text file) in a way that it would only read one character at a time, rather than String by String. This ... |
26. Java - Fastest Way to Reading Text Files Char by Char stackoverflow.comI have nearly 500 text files with 10 million words. I have to index those words. What is the fastest way to read from a text file character by character? Here ... |
27. how to read text file on any machine in java stackoverflow.comI am trying to read file,but it is reading only on my machine,it is not working on another machine.Here is my code..
|
28. reading floats form text file coderanch.comBufferedReader.readLine() is the best way to read lines of text. Open a FileReader first, then open a BufferedReader using your FileReader. Double.parseDouble() is a way to convert String to double value (or Float.parseFloat(), as required). You might need to String.trim() first, to remove any whitespace. [This message has been edited by Peter Chase (edited November 29, 2001).] |
29. Reading from a textfile coderanch.com |
30. Need Help ...to read text file.....??? coderanch.comI am using the InputStreamReader class extended in my class. From there I used read() method to read the characters from a file which is having arabic text. From read method I am getting the character in ASCII format...which cann't possible to display on browser...as all browser display ANSI format... Is someone having the idea..How to read the arabic text from ... |
31. read text file into text area coderanch.comEnjoy, pass a string as the filepath, then get the contents of the file via getFileContent() which returns a stringbuffer. To create a string call the toString() of the stringbuffer object. This code is really fast !! import java.io.*; /** * @author Mark Ayad * mark@javamark.com * 03-May-2002 / 14:12:35 * * com.jm.util * com.jm.htmlclean * FileReader.java * */ public class ... |
32. how read a file text from internet ? coderanch.comimport java.net.*; import java.io.*; import java.util.*; public class URLTest { public static void main(String[] args) throws Exception { URL url = new URL("http://www.javaranch.com"); URLConnection conn = url.openConnection(); StringBuffer buffer = new StringBuffer(); BufferedReader input = new BufferedReader(new InputStreamReader(conn.getInputStream())); String str = ""; while ((str = input.readLine()) != null ) { buffer.append(str).append("\n"); } System.out.println(buffer); input.close(); conn = null; } } |
33. reading from a text file coderanch.comHi, Im new to Java and am having alot of trouble with this one problem, if you could help it would be much appriciated. I am writing a program to display the resistance curve of a thermistor. The problem is that the x and y points are read in from a Dat file. The Dat file will be in the form ... |
34. Reading text files coderanch.comHi, I am new to Java and am trying to write a piece of code which will read from a text file and extract words ending with a question mark. I would like to be able to move forwards and backwards through a file. I've tried using FileReader but the read method only goes forwards. How can I then read the ... |
35. reading and seperating a text file coderanch.comim reading lines from a text file just fine.. what i need to do is seperate the line like so: text.txt: --------- 100 500 1000 200 450 2000 300 475 7503 ------------------------- when i read line 1 i get: "100 500 1000" i've tried multiple things, but can't get it to split the file up: var1 = 100 var2 = 500 ... |
36. Reading a text file on Linux machine coderanch.comMy server is running on a Linux machine. I have a link to download files from the server. The problme is that the users can be windows users. In this case the files formet gets distorted due to the end of line problem. I am currently using printwirter to write the file to the response is there a better way to ... |
37. Reading second in a text file coderanch.comHi this is Kris. How can i read a second line in a normal text file . In a loop, first line should be read and stored to a string/stream tokenizer and display all tokents, then read second line then store that line to string/stream tokenizer and display all tokens in second line. This should continue until completion of all lines ... |
38. Reading a Text file - HELP REQUIRED ASAP coderanch.comHi All, I have some text file in my local drive (Say C:\Test\inputFile.txt". This has the set of lines in it. I have to read these lines one by one inside my program and based on that I have to determine some logic. Right now I am doing the following steps to read the file: String inputFile= "C:\\Test\\InputFile.txt"; //readline try { ... |
39. Standard idiom for reading text files coderanch.comI'm not very experienced with I/O, and I am interested in knowing what the standard idiom for reading text files is. I am writing a class that reads an entire book (the Bible) from a plain text flat file, and returns the book as a String. Currently my code looks like this. public class BookReader { private String book; public BookReader(String ... |
40. how to read text file backwards coderanch.comYou can read through the file and only keep the last n lines you read with a "circular buffer". Say with a 10 line array ... while( null != ( line = readline() ) { linecount++; lines[ linecount % lines.length ] = input.readline(); } See what happens to the array index when you read line the 11th line or the 101st? ... |
41. Reading a text file coderanch.com |
42. read a text file coderanch.comForwarding an example about JTable. code: private void comboModeloActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboModeloActionPerformed ArrayList |
43. Null pointer exception reading from text file. coderanch.comThis line of code while ((strValue = objBufferedReader.readLine()) != null && (strValue = objBufferedReader.readLine())!= "") { reads two lines of text from the file. It compares the first one to null, then reads another and compares it to the literal "". Imagine that the program is about to read the last line of the file. The first "readLine" above reads it, ... |
44. HOW TO READ A NUMERIC VALUE FROM A TEXT FILE coderanch.comHi, I need a solution for my problem.I need to read a numeric value from a text file,such as,cosider a text file with following contents: The area of the figure area 23.133 end of file From this file, I need to read the numeric value of area(23.133) only.How can I get the value of area only from the text file. Thank ... |
45. Reading a text file client side coderanch.com |
46. Read Text File coderanch.comPretty straightforward... just wanting to read the contents of a text file and print those contents to the browser. When I compile and run my servlet, nothing obvious happens (I just see a blank window). Even if the file "text.txt" doesn't exist, no exception is thrown, so I can't really figure out what I'm doing wrong. Any help is very much ... |
47. Problem: read text file in java coderanch.comOk here is a quick implementation example using Castor (you can use Xstream too). We'll be using XML which is within the scope of your specs. // get a mapping file // that says how your questions are mapped Mapping eventoMapping=new Mapping(getClass().getClassLoader()); if (getClass().getResource("eventoMapping.xml")==null) { System.out.println("RESOURCE IS NULL"); } else { System.out.println("RESOURCE IS OK"); } try { eventoMapping.loadMapping(getClass().getResource("eventoMapping.xml")); } catch (IOException ... |
48. outofmemory reading text file coderanch.comReading a txt file into a textarea for display to the user...here is the code that reads the txt file: public void loadReport() { String inReport = " "; RandomAccessFile input; File inputFile; FileDialog fd = new FileDialog(this, "Saved Reports", FileDialog.LOAD); fd.setDirectory(selectedData.getInstallDirectory() + "/reports"); fd.setFont(new Font("sanserif", Font.PLAIN, 12)); fd.setBackground(Color.lightGray); fd.setVisible(true); String filename = fd.getDirectory() + fd.getFile(); inputFile = new File(filename); if ... |
49. Reading from a text file coderanch.comI am doing a Manufacturing System Simulation program. I need to read from a text file to create Machines and Buffer objects. The way I do it, i need to specifiy Machine and Buffer parameters in different text files. I state the parameters i want my machines to have in Machines.txt The same would be the same for Buffer, and reading ... |
50. How do I read a file containing non-english text? coderanch.comThe char data type in Java is a 16-bit Unicode character. It can contain Hindi characters as well as English (Latin-1) characters. There should be no difference in handling these character sets. How exactly do you need to compare the files? Do you just have to check if they are exactly the same or not? If that's the case, you don't ... |
51. Read Text File Using Relative Path. coderanch.commy question is, How to read the text file which is present in the web-inf folder (web project) using relative path? I can able to read the data using hard code path (Absolute path, c:\temp\...). I am not able to read the file using relative path. My java file is present in com.trave.wss.tfim.sso location and I have used ..//..//..//..//..// while declare ... |
52. Reading a text file coderanch.com |
53. reading a text file in javascript coderanch.comI was wondering how do to read a text file in javascript on a webpage I am working on. I need to create a phone list(150+ names), that can be searched by many(5-6) criteria, i thought that reading in a text file into an array would be the best and easiest way to do this. would appriciate other ideas as well ... |
54. HELP! reading a text file ************* coderanch.com |
55. read text file coderanch.com |
56. Java reading from text file passing code? coderanch.comHey folks another question for you lot... Basically i have a binary tree which im setting up at the moment like this root = new node("Q1,Is it in europe",1); root.left = new node("Q2, is it in england",2); root.right = new node("Q3, is it in america",3); root.left.left = new node("Q4, is it in the south?",4); I wanna do this differently so that ... |
57. Reading Japanese Characters from Text File coderanch.comHi, I have a text file where the text is written in Japanese. While I want to read the file using Java it can not recognise the japanese characters and it is giving "???" like characters instead of Japanese characters. FileInputStream fis = new FileInputStream("out.txt"); InputStreamReader isr = new InputStreamReader(fis,"UTF-8"); Reader in = new BufferedReader(isr); StringBuffer buf = new StringBuffer(); int ... |
58. Problem while Reading Japanese Characters from a Text File coderanch.comHi, I have a text file where the text is written in Japanese. While I want to read the file using Java it can not recognise the japanese characters and it is giving "???" like characters instead of Japanese characters. FileInputStream fis = new FileInputStream("out.txt"); InputStreamReader isr = new InputStreamReader(fis,"UTF-8"); Reader in = new BufferedReader(isr); StringBuffer buf = new StringBuffer(); int ... |
59. Reading a text file records separated by a ';' coderanch.com |
60. what is the fastest way to read 50 text files X ~35 kb each into memory ? coderanch.comHello all i need to read ~50 files on every server start and place each text files representation into memory that is each text files will have its own string ( which is the best type to use for the string holder ?) my question is what is the fastes way to read the files into memory , and what is ... |
61. Read a 5.6 mb text file coderanch.comRead a 5.6 mb text file (I/O and Streams forum at JavaRanch) A friendly place for programming greenhorns! Register / Login Java Forums Java I/O and Streams Read a 5.6 mb text file Post by: Tirthankar Mukherjee, Ranch Hand on Jul 12, 2009 03:30:38 I need to read a text file (5.6 mb ) with 162849 lines of data. ... |
62. Program not correctly reading from a text file coderanch.comThe following code is part of my Flash card program where the user can have two text files, one called questions and the other called answers, and then the program will display the questions and the user can see if he can get the right answer. package flashcards; import java.util.*; import java.io.*; public class FlashCards { public static void main(String[] args) ... |
63. Reading 600 mb size text file coderanch.comHi All, I am getting java heap space error while reading 600 mb text file. Actually I have to process each line and add the data to xml object. Due to this the size of object is dynamically growing. ANd giving heap space problem. I am using BufferedReader. Can any one please suggest some ideas? Thanks |
64. How to read from a text file, a buffer at a time (specific bytes at a time)? coderanch.comHi, Could someone tell me how I can read a text file, a buffer at a time? I want to read certain bytes at a time. I wanted to encrypt a text file using RSA ( just for knowledge sake ), using 1024 key size. But the size of the message to encrypt is limited. I can't go on increasing the ... |
65. Problem in reading this particular text file, what is the problem with it.. coderanch.comThanks for you reply Ernest Friedman-Hill It's an wounder full suggestion... I try'd with your code it's working fine but with this code also it's generates some error in reading some files.(I had attached a text file please try your code with this file). Content in this file is not important but the first two lines are important, if we can ... |
66. Problem with reading a huge text file efficiently coderanch.com |
67. Issue while reading French character from a text file coderanch.comI am reading the data from the file and then just passing it to an third party API (some other app) which is displaying it on web page . I don't have much info on how that app is writing , but its working fine for lower case characters, so i just wanna understand if my reading is having issues with ... |
68. Reading a text file coderanch.comHi Robin, thanks for your reply. I want to read the txt file word by word so that i can store the content of my file in particular columns of my database table. For example name in name column of table, Some figures in number column of my table. Please find the program that I am using for file reading and ... |
69. Tool for reading big text files coderanch.comHi All, I have a problem where my java code has to read big log files(around 4GB) containing XML and parser those XML to populate data. I can easily parse data using JAXB but i need to know if there is any open source tool provided to read those log files? I have to read these log files to identify a ... |
70. Reading a text file whilst it is in use coderanch.comHi, I'm using a data logging program that writes captured data out to a text file. It does this in real time, so the text file is in use during the whole time the program runs. Is there any way I can access this text file while it is in use? I have tried in Java, but it says the file ... |
71. Reading from a text file coderanch.com |
72. RE: reading Text file with the field positions coderanch.compublic static void main(String[] args) throws SQLException { Connection conn = null; Statement statement = null; RefDataBean refDataBean = new RefDataBean(); String readFile = null; int flag=0,flag_file=0; // dataBase Connection try { try { Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); } catch (ClassNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { // Driver drv = new COM.ibm.db2.jdbc.app.DB2Driver(); String url = "jdbc:db2:CCANE"; conn = ... |
73. Read query from textfile dbforums.com |
74. Infinite loop when reading text file java-forums.orgHi, I'm new to Java and I'm currently doing a big project that is basically a library system. Background...skip down to * for current problem... Users can have a max of 3 books out of any time, and I'm creating a 2d array of size [3] [12] to store 12 parts of information for each of the books. The last 3 ... |
75. A more efficient way to read from a text file java-forums.org |
76. Reading & Analyzing a Text file and java-forums.orgHi everyone .. Actually I have a little problem with reading and analyzing files in java : if I have a file which contains an English text, and I want to analyze .. and I want to count the number of specific words , and print their index in the file ! Example : "In these ways, the testing methodology provides ... |
77. Reg: Reading Files from Text file java-forums.orgHi, Pls guide me My requriment is to display Null pointer Exception and Log Entry Lines.I displayed null pointer exception using below coding . Text Files Look Like: Log Entry-- Date and Time Excpetion: Null pointer Exception Log Entry-- Date and Time --->1 Line Log Entry-- Date and Time ---> 2 --->3 Line Line Excpetion: Stack overflow exception ---> 4 --->5 ... |
78. Reading Text File with Certain Conditions java-forums.orgHi, Pls guide me My requriment is to display Null pointer Exception and Log Entry Lines.I displayed null pointer exception using below coding . Text Files Look Like: Log Entry-- Date and Time Excpetion: Null pointer Exception Log Entry-- Date and Time --->1 Line Log Entry-- Date and Time ---> 2 --->3 Line Line Excpetion: Stack overflow exception ---> 4 --->5 ... |
79. Reading a textfile java-forums.orgIs there a way to read this file: John Doe 23 Mary Ann 27 Mark Kay 33 So that a variable reads John Doe as one String and not spilt the name up into John alone? The text file can't be changed into: John Doe 23 Mary Ann 27 Mark Kay 33 I want to put John Doe into List[0][0], 23 ... |
80. Reading a text file java-forums.orgsorry, i thought that here i could find programs... i know that's a very common program... "stamp the content to video" i meant that this program should read the content of the text file and then make visible on the screen that content. Sorry for my bad english... if you help me, you would give me a great favour! |
81. reading text file java-forums.orghere is what im trying to figure out. I need to read a text file into a program evaluate the content and place in an array for future use. Heres how a line of text looks: tab is whitespace between the Long values. always 2 Long values 0 (tab) 1454 ... ....... .. ...... I am using Scanner and have found ... |
82. Can't read from a text file java-forums.orgHi, I want to read from a text file. Here is my code: package fileRelated; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class FileImport { public void importFile(){ File filInput = new File("c:\\javatest\\text.txt"); System.out.println(filInput.exists()); BufferedReader bfrInput = null; try { bfrInput = new BufferedReader(new FileReader(filInput)); } catch (FileNotFoundException e) { e.printStackTrace(); } } } When I run ... |
83. Help reading a text file. java-forums.orgHi, I'm new here and I'm having some trouble with a java program. I have to read a text file (The user provides the name). The program must follow these rules as well. The first rule is that a word consists of what the next() method of the Scanner class will return. The next() method returns a String that consists of ... |
84. Reading in Text Files java-forums.orgDoes anyone know why I can't read Tile.txt??????? I get this error from the code below Exception in thread "main" java.io.FileNotFoundException: Tile.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream. |
85. Reading in Text Files java-forums.orgI have a file that I need to read it, but I want to read it starting at the 8th line. How do I start at the 8th line as opposed to the 1st? Java Code: import java.io.FileReader; import java.io.FileWriter; import java.io.BufferedReader; import java.io.PrintWriter; import java.io.IOException; import java.io.FileNotFoundException; public class GameBoard { private BufferedReader inputStream; private Tile [][] gameTiles; public GameBoard ... |
86. Read text file java-forums.orgpublic synchronized static Vector readRecords(String file) throws IOException{ Vector users = new Vector(); BufferedReader in = new BufferedReader( new FileReader(file)); String line = in.readLine(); while (line != null){ StringTokenizer t = new StringTokenizer(line, "|"); String appDate = t.nextToken(); String firstName = t.nextToken(); String lastName = t.nextToken(); String homeNumber = t.nextToken(); String otherNumber = t.nextToken(); String doctorsName = t.nextToken(); User user = ... |
87. Read Text File java-forums.org |
88. Reading text files java-forums.org |
89. Reading specific portions of text file java-forums.orgHey Java experts! I just had a quick question. I spent a lot of time looking around, but I can't find a real answer. I'm looking for a way to parse a (very) long text file and pull a piece of it and write it to a next text file. I found that I could replace pieces, and that worked to ... |
90. Reading Text Files java-forums.org |
91. Store links in text file and read into variables java-forums.orgHie guys, quick question. I am trying implement an automated reader for a few news websites. The problem is finding a way to know which links have already been visited. So what I thought of is using a text file that stores all the links that were present on the page during the last program run and using basic string comparison ... |
92. problem with reading a text file with special char java-forums.orgHi All, I have a text file with special char " ' ". Alll the fields are separated by vertical line ( I ). while i am reading the file i am getting error coma missing. To avoid the above error i am using the following code. public static String forXML(StringBuffer aText){ final StringBuffer result = new StringBuffer(); final StringCharacterIterator iterator ... |
93. Reading text from files in package java-forums.orgOk so I have a problem, its pretty annoying too. I want it so that when my program starts up, one of the first things that is done is that a String will be created and initialized to the contents of a text file in my package. I am using Netbeans 7.0 to create the program and perhaps my use of ... |
94. Help needed with reading a text file java-forums.orgI have to read a text file of names and then give each name a percentage. Then I have to output the names to 2 separate text files, one containing the names who scored higher than 40% and the other containing the names who scored under 40%. This is what I have done so far and i have no idea where ... |
95. Reading Integers from a text file java-forums.org |
96. Reading text from file and storing forums.oracle.com |
97. Better(quicker) method of reading text from file? currently too slow forums.oracle.comYou read line by line, but as you build your final String (or StringBuilder or whatever the others suggest), you loose the multi-line structure of the file anyway. I would use a FileInputStream (raw bytes oriented) instead of your FileReader(character oriented, must be slower, it's at least searching for end-of-line's). Use it to fill in a large byte[] (memory does not ... |
98. Reading numbers from a text file forums.oracle.comIf you run this in a debugger, you'll see your problem. Basically, you've got 2 things to do: 1. Read in data from a file 2. Find the largest, smallest elements, and the average, and print that out You're having trouble because you're doing both at the same time. Do you know how to use ArrayList? |
99. reading a text file forums.oracle.comthanks!, Now all goes right! two question: - in my first version, the println printed the entire file and then also many number: 99, 88,99 e so on. What are they? - I see java is much focesed on try-catch-finally on the file read....It's good to check it in this way or I also can check if the file exists (File ... |
100. Reading text files in Java 1.4.2 forums.oracle.com |