Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Enumeration;
import java.util.Properties;

public class Main {

    public static void main(String[] args) throws Exception {
        Properties prop = new Properties();

        prop.put("Chapter Count", "200");
        prop.put("Tutorial Count", "15");
        prop.put("tutorial", "java2s.com");

        // assign the property names in a enumaration
        Enumeration<?> enumeration = prop.propertyNames();

        // print the enumaration elements
        System.out.println(enumeration.nextElement());
        System.out.println(enumeration.nextElement());

    }
}