Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static String[] difficultyStrings = { "Need more", "Hard", "Too hard" };

    public static String getDifficultyName(int val) {
        val = Math.min(val / 5, difficultyStrings.length - 1);
        val = Math.max(val, 0);
        return difficultyStrings[val];
    }
}