Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

Explain the concept of priming read Java.

Asked by Arti Trivedi Oct 13, 2022 1.3K views 1 answer
Share

About this question

I was taught this expression and pattern way back in the day. Sure, the name comes from old pumps that needed to be filled with water before they could pump water, but who cares? We're talking about code here.


Some really good examples and an explanation of what the pattern accomplishes would be welcome. How is this pattern regarded today?

Priming can sometimes get a defective loop working but at the cost of DRY. So it may be a brief stop on the way to a better design. Is this considered an anti-pattern? Are there alternatives?

Your answer

1 Answer

More Java discussions