[Solved] Why not everything is static function in java? Any differences in following two examples? [duplicate]


Your question simplifies to “Why do Object Oriented Programming when you can write Procedural?”

OOP vs Functional Programming vs Procedural

Besides that, you now need somewhere to store your Cuboid data. Might as well create a Cuboid object anyway, right?

1

solved Why not everything is static function in java? Any differences in following two examples? [duplicate]