input file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: input file

  1. #1
    Join Date
    May 2006
    Posts
    2

    input file

    ok im building a graph(adjacency list) and i want to know if someone can please explain to me how to read from a file('sample.txt') in such a way that i want only certain characters inputed to the list for vertex, edges etc.?

  2. #2
    Join Date
    Mar 2004
    Posts
    635
    There's more than enough tutorials online, all you have to do is search google for "java how to read text files"

    It's up to you to parse the data read in from the file to pick out the different vertex and edge values. You can look at either the StringTokenizer class or String.split() method.

  3. #3
    Join Date
    Dec 2005
    Posts
    48
    Quote Originally Posted by rudy
    ok im building a graph(adjacency list) and i want to know if someone can please explain to me how to read from a file('sample.txt') in such a way that i want only certain characters inputed to the list for vertex, edges etc.?
    Please see below tutorial
    http://www.javaresources.biz/content...e002c&item=I/O

Similar Threads

  1. extracting data from and input file
    By jasonlg3d in forum C++
    Replies: 1
    Last Post: 02-01-2006, 11:19 PM
  2. upload an image file and save on webserver.
    By sandhyaharsh in forum Java
    Replies: 0
    Last Post: 11-15-2005, 06:23 AM
  3. Jaek Graph - File Input
    By sldriskell in forum Java
    Replies: 3
    Last Post: 04-18-2005, 02:05 PM
  4. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 05:34 PM
  5. file name==class name. why?
    By siva in forum Java
    Replies: 2
    Last Post: 01-03-2001, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center