Java Indexing Machine
a Java Indexing Machine
==>
Indexing Machine | a Java 
Java Indexing Machine | a
Machine | a Java Indexing 

Sample Indexing

M.I.T. Java environment: go to doppio > here

Enter 'edit PlsAllow.java' and copy the code below.
Save and compile 'javac PlsAllow.java'
Then enter 'java PlsAllow'

TO USE the ArrayList, you simply enter a title,
headline, sentence, phrase, or locator and
fields, capitalizing those words for which
an alphabetical KWIC (key word in context)
subject heading is desired. A numeral will
also create an index entry. To finish, enter
<cr>  Screen output can be cut and pasted
into your computer document. See above video.

/* JIM - Java Indexing Machine
by J. Doug Ohmans 
Copyright (C) 2016 © 2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation. */
import java.util.*;
import java.io.*;

public class PlsAllow {
    public static void main(String[] args) {
        System.out.println("a Java Indexing Machine");
        System.out.println("99 the Rain in Spain");
        System.out.println("parses and sorts to:");
        System.out.println("99 the Rain in Spain");
        System.out.println("Indexing Machine | a Java");
        System.out.println("Java Indexing Machine| a");
        System.out.println("Machine | a Java Indexing");
        System.out.println("Rain in Spain | 99 the");
        System.out.println("Spain | 99 the Rain in");
        System.out.println(" ");

    Scanner console = new Scanner(System.in);
    ArrayList<String> binList = new ArrayList<String>();
    ArrayList<String> binSort = new ArrayList<String>();

    while (true) {
        System.out.print("Enter Entity or ' '--> ");
        String str = console.nextLine();
        binList.add(str);
        if (str.equals(" "))
            break;
        }
    for (int i = 0; i < binList.size(); i++) {
        String string = binList.get(i).toString();
        binSort.add(string);

        int shape = string.length();
        for (int j = 1; j < shape; j++) {
            if ((string.charAt(j) >= 'A') && (string.charAt(j) <= 'Z')) {
                int indx = j;
                String theString = "";
                for (int k = indx; k < shape; k++) {
                    theString = theString + string.charAt(k);
                }
                theString = theString + " | ";
                for (int m = 0; m < indx; m++) {
                    theString = theString + string.charAt(m);
                }

                binSort.add(theString);
                }
            }
        }
        Collections.sort(binSort);
        for (int n = 1; n < binSort.size(); n++) {
            String temp = binSort.get(n).toString();
            char c = temp.charAt(0);
            if ((c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) {
                System.out.println(temp);
            } 
        }
    }
}

OR for memory files, go here
Load JIM.class, JIM$1.class, binList.class, and binParse.class
Compile PlsAllow.java or execute JIM.java...