About Java that I want to know

Правка en1, от HOMIARA_RUBY, 2018-02-06 20:27:19

I'm learning OOP using Java. So you may find my question 'like dumb'. I have followed Java coders code like this not this. why? I thought Java has garbage collection system(not like destructor in C++) which is called randomly(As far I know). So creating lot of objects will result MLE(if no garbage collection is called during execution time and if an object take N space and we create M objects then it should take N*M space which may result MLE). So in Codeforces 'custom invocation' I tried to do experiment and see what happens. I did the same experiment in 'Ideone'. I found almost no difference (i thought M times larger for M objects) in terms of memory. Why?

I have asked the question here because Codeforces community is more responsive.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский HOMIARA_RUBY 2018-02-06 20:27:19 837 Initial revision (published)