Which of the following lines contains a valid comment?
LANGUAGE: JAVA CHALLENGE: Which of the following lines contains a valid comment?
Read MoreA comment starts with what characters?
LANGUAGE: JAVA CHALLENGE: A comment starts with what characters?
Read Morewrite an expression whose value is the initials of the three names : the first letter of each, joined together.
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 MoreGiven the String variable address, write an expression that returns the position of the first occurrence of the String “Avenue” in address.
LANGUAGE: JAVA CHALLENGE: Given the String variable address, write an expression that returns the position of the first occurrence of the String “Avenue” in address.
Read MoreDeclare a constant MONTHS_IN_DECADE, whose value is the value of the constant MONTHS_IN_YEAR (already declared ) multiplied by 10.
LANGUAGE: JAVA CHALLENGE: Declare a constant MONTHS_IN_DECADE, whose value is the value of the constant MONTHS_IN_YEAR (already declared ) multiplied by 10.
Read MoreDeclare an integer constant, MONTHS_IN_YEAR, whose value is 12.
LANGUAGE: JAVA CHALLENGE: Declare an integer constant, MONTHS_IN_YEAR, whose value is 12.
Read MoreOf the following variable names, which is the best one for keeping track of whether a patient has a fever or not?
LANGUAGE: JAVA CHALLENGE: Of the following variable names, which is the best one for keeping track of whether a patient has a fever or not?
Read MoreWhich is the best identifier for a variable to represent the amount of money your boss pays you each month?
LANGUAGE: JAVA CHALLENGE: Which is the best identifier for a variable to represent the amount of money your boss pays you each month?
Read MoreAssume that word is a String variable. Write a statement to display the message “Today’s Word-Of-The-Day is: “followed by the value of word on a line by itself on standard output.
LANGUAGE: JAVA CHALLENGE: Assume that word is a String variable. Write a statement to display the message “Today’s Word-Of-The-Day is: “followed by the value of word on a line by itself on standard output.
Read MoreWrite 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.
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 MoreGiven an integer variable count, write a statement that displays the value of count on the screen.
LANGUAGE: JAVA CHALLENGE: Given an integer variable count, write a statement that displays the value of count on the screen. Do not display anything else on the screen — just the value of count.
Read MoreGiven a floating point variable fraction, write a statement that displays the value of fraction on the screen.
LANGUAGE: JAVA CHALLENGE: Given a floating point variable fraction, write a statement that displays the value of fraction on the screen. Do not display anything else on the screen– just the value of fraction.
Read More