Q:

How to get the maturity value from simple interest and the equation for it

For the maturity I think the formula is wrong and it gives wrong answer. I just want it monthly. Maturity case is at the end. Any help would be appreciated.
package interest;

import java.util.Scanner;

public class Interest {

    public static void main(String[] args) {
        Scanner userInput = new Scanner(System.in);
        Scanner whatKindPeriod = new Scanner(System.in);
        double principle;
        double rate;
        double period;
        double result;
        double periodNumber;
        String type;
        String matOrSimp;
        double matResult;

        System.out.println("find maturity or simple interest? for simple interest enter simple, and for maturity enter maturity");
        matOrSimp = userInput.next();
        switch (matOrSimp) {
            case "simple":
                System.out.println("please enter the principle:");
                principle = userInput.nextDouble();
                System.out.println("Enter the rate:");
                rate = userInput.nextDouble();
                System.out.println("enter period:");
                period = userInput.nextDouble();
                System.out.println("is it daily, monthly or yearly?");
                type = userInput.next();
                switch (type) {
                    case "yearly":
                        result = (principle * rate * period) / 100;
                        System.out.println("your simple interest is: $" + result);

                    case "daily":
                        double daily = period / 365;
                        result = (principle * rate * daily) / 100;
                        System.out.println("your simple interest is: $" + result);

                    case "monthly":
                        double monthly = period / 12;
                        result = (principle * rate * monthly) / 100;
                        System.out.println("your simple interest is: $" + result);

                        SimpleInterest interest = new SimpleInterest(principle, rate, period);
                }
            case "maturity":

                System.out.println("please enter the principle:");
                principle = userInput.nextDouble();
                System.out.println("Enter the rate:");
                rate = userInput.nextDouble();
                System.out.println("enter time of invesment:");
                period = userInput.nextDouble();
                double monthly = period / 12;

                matResult = (principle * (1 + rate * monthly));
                System.out.println("result is:" + matResult);

        }

    }
}

A:

The formula for maturity includes a compounding rate, so instead of:
principle * (1 + rate * monthly)

you should be using in general:
principle * Math.pow(1 + periodicRate, compoundingPeriods)

So specifically for your monthly compounding, the following method computes the desired maturity:
    double computeMaturity(double principle, double monthlyRate, double months) {
        return principle * Math.pow(1 + monthlyRate, months);
    }

A final note to remind that the annual rate has to be given in fractional value and not percentual (10% rate = 0.1 monthlyRate).
Complete code on GitHub
Hope this helps.

