Size

Report a typo

Suppose you are compiling a resource of various city names in this beautiful world and creating an enum const in the Abbreviation enum class. You have created 260 of such constants (sorted in lexicographic order), with every 10 starting with one letter of the English alphabet. The Abbreviation class is shown below.

public enum Abbreviation {
    AB, AC, AK, ...., AZ, // 10 values start with A
    BA, BE, BF, ...., BY, // 10 values start with B
    ...
    ZA, ZE, ZI, ...., ZY  // 10 values start with Z
}

EnumSet<Abbreviation> subSet = EnumSet.range(Abbreviation.DA , Abbreviation.YZ);
System.out.println(subSet.size());

For example, the first 10 city abbreviations start with the letter A , for example, AB, AC, AK, AM, AQ, etc. (sorted in lexicographic order). The next 10 will start with the letter B, and, correspondingly, abbreviations 251 to 260 will have Z as their first letter.

Your task is to find out the output of the program.

Enter a number
___

Create a free account to access the full topic