Question: in java 1) Given a String variable response that has already been declared , write some code that repeatedly reads a value from standard input

in java

1)

Given a String variable response that has already been declared , write some code that repeatedly reads a value from standard input into response until at last a Y or y or N or n has been entered.

ASSUME the availability of a variable , stdin, that references a Scanner object associated with standard input.

2)

Clunker Motors Inc. is recalling all vehicles from model years 2001-2006. A boolean variable named norecall has been declared . Given a variable modelYear write a statement that assigns true to norecall if the value of modelYear does NOT within the recall range and assigns false otherwise.

Do not use an if statement in this exercise!

3)Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is a decimal digit (0-9).

4) Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is NOT a letter.

5)Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is alphanumeric , that is either a letter or a decimal digit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!