Skip to main content
added 528 characters in body
Source Link
John
  • 147
  • 4

Edit in 2/26/2017:

Thanks for EBrown and others input, I've modified my program structure and added a few new functions.

I also have a question on multiple scanners I've put in my program. I did some search on it and many people says this is also a bad practice that may confuse the programmer in long run. I think it cause the error when I trying to close the scanner object in simple_a1 method, so I only close the user_option scanner (located in main method). So my question is: will it still cause resource leak?

Edit in 2/26/2017:

Thanks for EBrown and others input, I've modified my program structure and added a few new functions.

I also have a question on multiple scanners I've put in my program. I did some search on it and many people says this is also a bad practice that may confuse the programmer in long run. I think it cause the error when I trying to close the scanner object in simple_a1 method, so I only close the user_option scanner (located in main method). So my question is: will it still cause resource leak?

Simple array implementationusage demonstration

edited tags
Link
Der Kommissar
  • 20.3k
  • 4
  • 70
  • 158
Loading
Source Link
John
  • 147
  • 4
Loading