write a String expression whose value is the String equivalent of each these variables  joined by a single hyphen (-) So if areaCode, exchange, and lastFour, had the values  800, 555, and 1212, the expression’s value would be “800-555-1212”.

write a String expression whose value is the String equivalent of each these variables  joined by a single hyphen (-) So if areaCode, exchange, and lastFour, had the values  800, 555, and 1212, the expression’s value would be “800-555-1212”.

LANGUAGE: JAVA

CHALLENGE:

Given three int variables that have been declared and given values, areaCode, exchange, and lastFour, write a String expression whose value is the String equivalent of each these variables  joined by a single hyphen (-) So if areaCode, exchange, and lastFour, had the values  800, 555, and 1212, the expression’s value would be “800-555-1212”. Alternatively, if areaCode, exchange, and lastFour, had the values 212, 867 and 5309 the expression’s value would be “212-867-5309”.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level