Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static void main(String args[]) throws Exception {
        Properties prop = new Properties();
        FileInputStream fis = new FileInputStream("sampleprops.xml");
        prop.loadFromXML(fis);
        prop.list(System.out);
        System.out.println("\nThe foo property: " + prop.getProperty("foo"));
    }
}