In the Popular section choose: Java: A concurrent, class-based, statically typed object-oriented language.
Click the pencil icon next to your repl name.
In the Default name: input box type: TryCatch
Delete all the lines of code provided as an example.
Copy the TryCatch.java Template (Java) code (below)
Paste that code into your new TryCatch class in the editor
Change the @author put-your-username-here
Replace blank on after the: years = scan.nextInt();
with these lines: interest = principal * rate * years;
total = principal + interest;
payment = (total / years) / 12;