CleanBackupFolders.java file:
import java.io.*; public class CleanBackupFolders { public static void main(String[] args) throws IOException { ... Settings IniFileObj = new Settings(); ... } } File Settings.java:
public class Settings { public void Settings() { System.out.println("Constructor executed!"); } } In the first class, the constructor is not called for an object. If after the line
IniFileObj.Settings(); then everything in this constructor is executed. What is the problem?