Results 1 to 4 of 4
Thread: Line:38: ';' expected
- 11-22-2010, 03:10 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 80
- Rep Power
- 0
Line:38: ';' expected
Hi.
I have checked this statement so many times. Can someone tell me what I'm missing?
MonthlyPmts.java:38: ';' expected
outputStr = "The number of months to payoff loan are : " + MostoRepay); ^
The caret is under the closingn parenthesis.
Java Code:import java.util.*; import javax.swing.JOptionPane; public class MonthlyPmts { static Scanner console = new Scanner(System.in); public static void main(String[] args){ /* Declaring the variables that will be used in the problem */ String inputStr; String outputStr; int NoMos; double MostoRepay; double IntRateYr; double loanAmt; double intRateMon; double monPmt; /* Input Dialog boxes */ inputStr = JOptionPane.showInputDialog ("Enter the loan amount: "); loanAmt = Double.parseDouble(inputStr); inputStr = JOptionPane.showInputDialog ("Enter the yearly interest rate: "); IntRateYr = Double.parseDouble(inputStr); inputStr = JOptionPane.showInputDialog ("Enter the number of months : "); NoMos = Integer.parseInt(inputStr); inputStr = JOptionPane.showInputDialog ("Enter the monthly payment: "); monPmt = Double.parseDouble(inputStr); MostoRepay = loanAmt / monPmt; outputStr = "The number of months to payoff loan are : " + MostoRepay); JOptionPane.showMessageDialog(null,outputStr, "Months Remaing to Payoff Loan", JOptionPane.INFORMATION_MESSAGE); } }
- 11-22-2010, 03:30 AM #2
Member
- Join Date
- Nov 2010
- Posts
- 73
- Rep Power
- 0
-
What is the purpose of the close-parenthesis on that line?
- 11-22-2010, 03:35 AM #4
Member
- Join Date
- Oct 2010
- Posts
- 80
- Rep Power
- 0
Similar Threads
-
tracing java application line by line using netbeans
By chandrasekhar123 in forum NetBeansReplies: 1Last Post: 08-03-2010, 03:46 PM -
Formatting java command line output - Multi line string
By dricco in forum New To JavaReplies: 2Last Post: 07-02-2010, 03:20 PM -
Need to read an .ini and .abook file line by line (both files contain texts)
By ollyworks in forum Java AppletsReplies: 4Last Post: 09-10-2009, 11:18 AM -
Reading in a line of data and splitting the line up into variables
By guru32 in forum New To JavaReplies: 9Last Post: 04-07-2009, 04:51 AM -
Reading in data from file line by line
By bluekswing in forum New To JavaReplies: 1Last Post: 10-02-2007, 01:19 AM
Bookmarks