MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.awt.Font;
import java.awt.GraphicsEnvironment;

public class MainClass {
    public static void main(String[] a) {
        GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String[] fontnames = e.getAvailableFontFamilyNames();
        for (String s : fontnames) {
            System.out.println(s);
        }
    }
}