View the step-by-step solution to:


1.   Assume the variable name references a String object and has a value in it. Write the code that determines

whether name contains "Jeffrey".

2.   Modify the code you wrote in the previous question so it performs a case-insensitive comparison.

3.   Given the declaration, write the code that returns the string indicated in each question. Store each in a variable of your choosing.

String place = "Broadway Café";

a) "Broadway"

b) "way"

c) "Cafe"

4.   Write the code that declares a Scanner object and two integer variables, then reads values into the two integers from the keyboard.

5.   Using the same Scanner object you declared in the last problem, come up with the needed variable(s) to read the character '%' from the keyboard. Your code must store the final character into a char variable.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Information Security tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors