Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.ResourceBundle;

public class Main {
    private static void printBloc(ResourceBundle bundle, String key, String indent) {
        // print options
        String line = null;
        int rank = 1;
        do {
            line = getHelpString(bundle, key + rank);
            if (line != null) {
                System.out.println(indent + line);
                printBloc(bundle, key + rank + "_", indent + "   ");
            }
            rank++;
        } while (line != null);
    }

    private static String getHelpString(ResourceBundle bundle, String key) {
        try {
            return bundle.getString(key);
        } catch (Exception e) {
            return null;
        }
    }
}