First, launch NetBeans and close any previous projects that maybe 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 theHorstmann textbook chapter 2 programming exercise, Business, p2.23.
Request the ten-digit phone number from the user at the commandline.
Output should prints string 10 numbers into form (XXX)XXX – XXXX <—— I can’t figure this part out.
——————————————————————————————————-
My code:
package phonenumberconversation;
import java.util.Scanner;
public class PhoneNumberConversation {
public static void main(String[] args){
Scanner sc = newScanner(System.in);
System.out.print(“Enterten-digit phone number: “);
String pk =sc.next();
System.out.println(“Yourphone number is “+pk);
// TODO code applicationlogic here
PayPal Gateway not configured
PayPal Gateway not configured