Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the second character of the value of name. So if the value of name were “Smith” the expression’s value would be ‘m’.

Java

LANGUAGE: JAVA CHALLENGE: Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the second character of the value of name. So if the value of name were “Smith” the expression’s value would be ‘m’.

Read More

Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the first character of the value of name. So if the value of name were “Smith” the expression’s value would be ‘S’.

Java

LANGUAGE: JAVA CHALLENGE: Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the first character of the value of name. So if the value of name were “Smith” the expression’s value would be ‘S’.

Read More

Write an expression whose value is the number of characters in the following String : “CRAZY!\n\\\t\\\\\\\\\\n. . . .\\ \\\r\007’\\’\”TOOMUCH!”

Java

LANGUAGE: JAVA CHALLENGE: Write an expression  whose value  is the number of characters  in the following String : “CRAZY!\n\\\t\\\\\\\\\\n. . . .\\ \\\r\007’\\’\”TOOMUCH!” Suggestion: copy/paste the above String  into your code– it’s too crazy to try to copy it by typing.

Read More