Basically I am combining two questions into one. Both the languages have multiple ways to take input from users and print output to standard console. I have always used C, now starting Java(tired of reinventing wheel in C). However in case of huge data I/O things are different. I need answers for following cases:-
- Fastest way to get and put data.
- I/O which puts least effect on the system performance. Sometimes reading and writing huge data take a toll on the system and degrades system performance as a whole, making that one program malicious to rest of programs.
Answers to both of the cases may be different. I couldn’t find satisfying answer to both after some googling. I found about getchar_unlocked() etc. but what about Java and the second case? Hence I am asking it here again