Posts Tagged ‘Java’
Write a String constant consisting of exactly 5 exclamation marks.
LANGUAGE: JAVA CHALLENGE: Write a String constant consisting of exactly 5 exclamation marks.
Read MoreWrite a String constant consisting of exactly one character — any character will do.
LANGUAGE: JAVA CHALLENGE: Write a String constant consisting of exactly one character — any character will do.
Read MoreWrite a String constant that is the empty string.
LANGUAGE: JAVA CHALLENGE: Write a String constant that is the empty string.
Read MoreThe character escape sequence to force the cursor to go to the next line is:
LANGUAGE: JAVA CHALLENGE: The character escape sequence to force the cursor to go to the next line is:
Read MoreWhich comment below is the most helpful?
LANGUAGE: JAVA CHALLENGE: Which comment below is the most helpful?
Read MoreWe hope you never have to encounter anything like the following expression in a program, but consider it for a moment and indicate its value: ( /* 5 + 3 */ – 9 + 6/*8*//2 ) //*+4*/ -10
LANGUAGE: JAVA CHALLENGE: We hope you never have to encounter anything like the following expression in a program, but consider it for a moment and indicate its value: ( /* 5 + 3 */ – 9 + 6/*8*//2 ) //*+4*/ -10
Read MoreWhich 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 More