I want to input a very big txt file(about 500m) and analysis it.
Unless I read it all, I can't analysis it. But it's so big, I'm afraid java can't deal with it. Can I use a array like 50000*50000? Is it a big problem to jvm?
Depending on the kind of analysis you need to do, you probably don't need to load the whole thing into memory. Just read it line by line, discarding each line as it is read and analyzed.