Results 1 to 2 of 2
Thread: Hi guys! Noob question...
- 09-26-2011, 04:36 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 2
- Rep Power
- 0
Hi guys! Noob question...
Hi all!
I'm pretty much just starting out in Java and am a bit confused by a piece of homework I have. Would appreciate pointers as to where I can look.
I have a .txt file containing 300 Greek heroes/gods etc. I need to search the strings for any name which has the first 3 letters, repeated after the prefix.
The only 2 right answers are Phosphor and Tartarus.
I've tried various different methods but if I try to select a substring (0,3) it tells me it's out of index range? I'm assuming that's because there is 1 name with 2 letters.
I'm at a complete loss right now. And I don't even know what to search for in Google! lol!
- 09-26-2011, 04:43 PM #2
Re: Hi guys! Noob question...
Write a method that tests a single String for the condition you're checking. Get that working. Then write a different method that reads in a file and returns a List of Strings. Then call the first method with each String in that List.
If you get stuck on the first method, write an SSCCE that demonstrates what you're doing.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
Probably Really Noob Question
By bpx95 in forum New To JavaReplies: 2Last Post: 05-16-2011, 01:44 AM -
Reallyy noob question
By x2robbie2x in forum New To JavaReplies: 3Last Post: 02-18-2010, 04:58 AM -
Noob button question.
By dudejonne in forum Java AppletsReplies: 4Last Post: 10-20-2009, 10:51 PM -
Question - I'm a noob!
By Insaeno in forum New To JavaReplies: 5Last Post: 08-04-2008, 03:20 AM -
Noob question- easy
By mattonitto in forum New To JavaReplies: 7Last Post: 06-13-2008, 12:26 AM


3Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks