Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileInputStream;
import java.util.Enumeration;
import java.util.Properties;

public class Main {
    public static void main(String[] args) throws Exception {
        Properties config = new Properties();
        config.load(new FileInputStream("conf-file.pros"));

        Enumeration en = config.keys();
        while (en.hasMoreElements()) {
            String key = (String) en.nextElement();
            System.out.println(key + ":" + config.get(key));
        }
    }
}