Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Enumeration;
import java.util.Locale;
import java.util.ResourceBundle;

public class Main {

    public static void main(String[] args) {

        ResourceBundle bundle = ResourceBundle.getBundle("hello", Locale.US);

        System.out.println(bundle.getString("hello"));

        Enumeration<String> enumeration = bundle.getKeys();

        while (enumeration.hasMoreElements()) {
            System.out.println(enumeration.nextElement());
        }

    }
}