Hi Guys,
this is my first post and my first real stab at getting to grips with
Java. Here's what I'm trying to do:
I have a file that I read line-by-line containing a bunch of User Names and Applications that each User has used. I need a way of counting the number of times each App for any given User has been used. Sounds simple eh? File would look something like this....
User: John
App: Excel
App: Excel
App:
Word
App: Outlook
-----------------
User: Fred
App: Word
App: Word
----------------
User: Steven
App: Excel
App: Word
In perl this would be easy. I'd create a Hash Array and dynamically name each key as "User.AppName" (John.Excel, John.Outlook, Fred.Word etc) and then assign each a value based on some counter that i increment, so in the above example, Fred.Word=2. Having read some posts on here and also on other sites, I see that you cannot dynamically create variables in this way. I was wondering if anyone had any ideas as to how I might go about solving this problem..?
Many thanks
Johny