Instantiating shapes using the Factory Design Pattern in Java
You could rewrite getShape as follows:

public static Shape getShape(String shapeType) {
    switch (shapeType.trim().toUpperCase()) {
        case "CIRCLE":
            return new Circle();

        case "RECTANGLE":
            return new Rectangle();

        case "TRIANGLE":
            return new Triangle();

        default:
            return null;
    }
}