Link to home
Start Free TrialLog in
Avatar of jmurguia
jmurguia

asked on

"Expected" error Why?

Why am I getting an "expected" error on the line below marked with "HERE!"?    



      double principal, annual_rate, time;
     
      principal=0.0;
      System.out.print("Enter the principal amount: ");      
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      try {
         
      break
             
          principal = Double.parseDouble(br.readLine());               HERE!
            } catch (IOException ioe) {
         System.out.println("IO error trying to read principal!");
         System.exit(1);
            }

      annual_rate=0.0;
      System.out.print("\nEnter the annual rate of interest: ");      
      BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in));
Avatar of cup
cup

Looks like C#.  Try posting in the C# forum.
Avatar of jmurguia

ASKER

Nope its in Java
Avatar of Mayank S
Pls post the full code. Have you imported java.io for BufferedReader?

>> break

Remove that
ASKER CERTIFIED SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any reason for the B grade? If you want clarification, you can ask for more information. B grade is given if the answer was not a direct and complete solution. I don't see what else the solution could be.