I have a requirement to implement feature toggling in my current project. I have no idea how to implement it from scratch in Java.
I have read the theory behind the feature toggling at various articles related to this topic but I haven't yet seen the implementation tutorial or documentation that describe this in detail for a beginner.
I would recommend taking a look at some existing implementations to get ideas on how you want your system to behave and fits with your requirements. There is a small list at http://featureflags.io/java-feature-flags/, and poking around the web can probably find more.
In the end, you'll need to consider a few things:
Edit: From personal experience, Launch Darkly has a pretty cool approach where the clients are loaded with the rules engine for determining flag status, which makes it very fast & resilient to the hosted service going down.