35 Points
in JAVA
In the Lesson Slides for this activity, we developed a method findChar for...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 19.11.2020 01:00 lealiastentz532542
35 Points
in JAVA
In the Lesson Slides for this activity, we developed a method findChar for figuring out if a character was in a String.
The implementation was:
public boolean findChar(String string, String key)
{
for(int index = 0; index < string. length(); index++)
{
String character = string. substring(index, index+1);
if(character. equals(key))
{
return true;
}
}
return false;
}
However, there is a much more efficient and simple algorithm that we can use to determine if a character is in a String. Using the method signature public boolean findChar(String string, String key), figure out a more efficient method with a lower exection count.
Hint: We’ve learned a couple of methods that can tell us what index a character is at - can we use those to determine if the character is in a String?
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 17:50
You work in the accounting department and have been using a network drive to post excel workbook files to your file server as you complete them. when you attempt to save a workbook file to the drive, you see the error message: “you do not have access to the folder ‘j: \’. see your administrator for access to this folder.” what should you do first
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 04:30
Which relativos possible when two tables share the same primary key? a.) one-to-one b.) one-to-many c.) many-to-one d.) many-to-many
Answers: 2
You know the right answer?
Questions
![question](/tpl/images/cats/fizika.png)
Physics, 19.05.2021 04:40
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.05.2021 04:40
![question](/tpl/images/cats/himiya.png)
Chemistry, 19.05.2021 04:40
![question](/tpl/images/cats/mat.png)
Mathematics, 19.05.2021 04:40
![question](/tpl/images/cats/geografiya.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 19.05.2021 04:40
![question](/tpl/images/cats/istoriya.png)
History, 19.05.2021 04:40
![question](/tpl/images/cats/mat.png)
Mathematics, 19.05.2021 04:40
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.05.2021 04:40