Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Main {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        try (InputStream input = new FileInputStream("test.properties")) {
            properties.load(input);
        }

        for (String key : properties.stringPropertyNames()) {
            System.out.println(key + " = '" + properties.get(key) + "'");
        }
    }
}