public class DoSomething { private static final Logger logger = LoggerFactory.getLogger(DoSomething.class);
private final AtomicBoolean Flag = new AtomicBoolean(false);
LogMessage logMessage= new LogMessage(); // Creating an object to call a method in it
public static final String ERROR_MAP = "ERROR_MAP";
public static final String errorJsonString = System.getenv("RESTART_ERROR_MAP");
I tried to create an object of LogMessage. And use it inside a method of DoSomething class. Is this fine or should I move that line inside the method?