Question: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create

First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).

Then create a new Java application called "PhoneNumberConversion" (without the quotation marks) based on the Horstmann textbook chapter 2 programming exercise, Business, p 2.23.

Request the ten-digit phone number from the user at the command line.

so far i have the below code but i am not getting the right output. I am trying to add "The formatted number is 973-931-1500 Can someone please help me?

import java.util.Scanner;

public class phonenumberconversation { public static void main(String[] args) { // Declaration for scanner variable for input Scanner sc = new Scanner(System.in); //inputting my phone number System.out.print("Enter ten-digit phone number: 973-931-1500 ");

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!