Quantcast
Channel: User Federico klez Culloca - Stack Overflow
Viewing all articles
Browse latest Browse all 499

Comment by Federico klez Culloca on Java static members of abstract classes

$
0
0
Encapsulate the capacity in a method getCapacity. That method can look for a TRAM_CAPACITY or BUS_CAPACITY static variable depending on which class is implementing it. This way you don't need to care about static variables and inheritance.

Viewing all articles
Browse latest Browse all 499

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>