The Artima Developer Community
Sponsored Link

Java Answers Forum
How to load file into an array

1 reply on 1 page. Most recent reply: Apr 17, 2002 2:28 AM by Singh M.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
dragon88

Posts: 1
Nickname: dragon88
Registered: Apr, 2002

How to load file into an array Posted: Apr 16, 2002 5:36 PM
Reply to this message Reply
Advertisement
Hello,
i am having problem with loading an array from a text file, and i also don't know how to get ride of the puntuation marks.
Can somone help me because i am very new to Java and if possible can you explain what each line does.
Say i got a file named "ABC.txt"
"Hello!@#Welome&(*&To Java"
How do i get this file into an array and get ride of the punctuation so that when i print them out it will be "Hello Wecome To Java".
Thanks hope someone out there can help me out.
:)


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: How to load file into an array Posted: Apr 17, 2002 2:28 AM
Reply to this message Reply
Before posting your query can you use the search functionality provided by Bill.

Anyway, this shows you how to read from a file...

http://www.artima.com/forums/flat.jsp?forum=1&thread=572&message=1930&redirect=true&hilite=true&q=read

For your next step, just have a look at the class java.lang.Character

Flat View: This topic has 1 reply on 1 page
Topic: JEditorpane - Wrapping Previous Topic   Next Topic Topic: help on a program for saving a file on a web server

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use