I have an interface "FlowControl" as it defines the methods should be implemented by those classes to process the data in correct order. Now, as those classes have some functions that can be called from other classes, i want to make those interface methods private inside each class. But doing so results in error in intellij. I am a beginner in java so please help me or is there any other better approach for achieving this?
public interface FlowControl{
void writeData();
}
public class CustomerInfo() implements FlowControl{
**private** void writeData(){
//Some functionality private to each class
}
}