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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started