Order the answer to: Hi, I have written a program, it can run. But I have difficulties to produce an error message if the

Academic Help net programming Order the answer to: Hi, I have written a program, it can run. But I have difficulties to produce an error message if the

net programming

Order the answer to: Hi, I have written a program, it can run. But I have difficulties to produce an error message if the

Question Hi, I have written a program, it can run.
But I have difficulties to
Here is the program:
package assignment
import java.util.Scanner;
public class Assignment {
    public static void main(String[] args) {
     Scanner input = new Scanner(System.in);
    
       
     String phoneLetter; //accept phonenumber to key in as letters
     int i, mark, len; //’mark’ stores thelocation where a hyphen will be placed
     char c;
     Scanner kb = new Scanner (System.in);//taking input from keyboard
   
     do { //use do-while loop to accept thephoneNo with any length
         i=0; mark=0;
        System.out.println(“Enter the phone number in letters: “);
         phoneLetter = kb.nextLine();//read the input
         phoneLetter = phoneLetter.toUpperCase();//accepting upper or lowercase
         phoneLetter = phoneLetter.replaceAll(” “, “”);//remove blankspaces  
      
         while (i Attached
Subject net programming
Ready to try a high quality writing service? Get a discount here