write an expression whose value is the initials of the three names : the first letter of each, joined together.

Java

LANGUAGE: JAVA CHALLENGE: Given three String variables that have been declared and given values, firstName, middleName, and lastName, write an expression whose value is the initials of the three names : the first letter of each, joined together. So if firstName, middleName, and lastName, had the values “John”, “Fitzgerald”, and “Kennedy”, the expression’s value  would be JFK”. Alternatively, if firstName, middleName,…

Read More

Write a single statement that outputs num and cost to standard output. Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character.

Java

LANGUAGE: JAVA CHALLENGE: Two variables, num and cost have been declared and given values : num is an integer and cost is a double. Write a single statement that outputs num and cost to standard output. Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character. Do not…

Read More