Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to read particular column from text file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
personid gender height class
1 female 1.6 short
2 male 2.0 tall
3 male 1.85 medium
4 female 1.9 medium
5 male 1.7 short
6 female 1.8 medium
7 female 1.95 medium


for eg i have to find minimum and maximum height from column height
thank you...
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the file line by line, split each line into parts, put the data in an appropriate data structure and do the necessary computations to calculate the desired result.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can transform the file to a CSV -maybe replacing spaces with commas is sufficient- you could use an existing library to help you out. See the "Excel" section in https://coderanch.com/how-to/java/AccessingFileFormats for that.
 
Ranch Hand
Posts: 87
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic