subject

Fun with Characters Complete the checkCharacter() method which has 2 parameters: A String, and a specified index (int). The method checks the character at the specified index of the String parameter and returns a String based on the type of character at that location indicating if the character is a letter, digit, whitespace, or unknown character.

Ex: The method calls below with the given arguments will return the following Strings:
checkCharacter("happy birthday", 2) returns "Character 'p' is a letter"
checkCharacter("happy birthday", 5) returns "Character ' ' is a white space"
checkCharacter("happy birthday 2 you", 15) returns "Character '2' is a digit"
checkCharacter("happy birthday!", 14) returns "Character '!' is unknown"

CODE:
public class LabProgram {
public static String checkCharacter(String inputString, int index){
/* Type your code here. */
}

public static void main(String[] args) {
System. out. println(checkCharacter("happy birthday", 2));
System. out. println(checkCharacter("happy birthday", 5));
System. out. println(checkCharacter("happy birthday 2 you", 15));
System. out. println(checkCharacter("happy birthday!", 14));
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
The cm is responsible for overseeing the actions of the crisis management team and coordinating all crisis management efforts in cooperation with disaster recovery and/or business continuity planning, on an as-needed basis
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
You know the right answer?
Fun with Characters Complete the checkCharacter() method which has 2 parameters: A String, and a s...
Questions
question
Social Studies, 10.07.2019 16:30
question
Chemistry, 10.07.2019 16:30
Questions on the website: 13722362