Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago