Skip to main content
Question Protected by yannis
Notice added Needs detailed answers by yannis
Notice removed Reward existing answer by gnat
Bounty Ended with user7519's answer chosen by gnat
Notice added Reward existing answer by gnat
Bounty Started worth 50 reputation by gnat
Tweeted twitter.com/#!/StackProgrammer/status/204847865393201152

In java, Should we avoid object creation in Java?

Source Link
Slamice
  • 2.7k
  • 3
  • 16
  • 10

In java, avoid object creation?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible.

This seems somewhat to defeat the purpose of object oriented programming. If we aren't creating objects then we are just writing one long class C style, for optimization?