Set hasDigit to true if the 3-character passCode contains a digit.

Set hasDigit to true if the 3-character passCode contains a digit.

public class CheckingPasscodes {

Don't use plagiarized sources. Get Your Custom Essay on
Set hasDigit to true if the 3-character passCode contains a digit.
Just from $8 /Page 0r 300 words
Order Now

public static void main (String [] args) {

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

boolean hasDigit = false;

String passCode = “”;

int valid = 0;

passCode = “abc”;

/* Your solution goes here */

if (hasDigit) {

System.out.println(“Has a digit.”);

}

else {

System.out.println(“Has no digit.”);

}

return;

}

}

Looking for a similar assignment? Get help from our qualified experts!

Order Now