1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nana76 [90]
2 years ago
6

Assuming that s and t are Strings, which of the following code fragments are such that the value returned by s.indexOf( t ) befo

re the code is executed is equal to the value of the int n after the code is executed?
I. int n = -1;
int tSize = t.length();
boolean found = false;
while ( !found && tSize <= s.length() )
{
n++;
if ( t.equals( s.substring( 0, tSize ) ) )
found = true;
else
s = s.substring( 1 );
}
if ( !found )
n = -1;
II. int n = -1;
int sSize = s.length();
int tSize = t.length();
boolean found = false;
while ( !found && n + tSize + 1 <= sSize )
{
n++;
if ( t.equals( s.substring( n, n + tSize ) ) )
found = true;
}
if ( !found )
n = -1;
III. int n = 0;
int sSize = s.length();
int tSize = t.length();
boolean found = false;
while ( !found && n + tSize <= sSize )
{
if ( t.equals( s.substring( n, n + tSize ) ) )
found = true;
n++;
}
if ( found )
n--;
else
n = -1;
A. I only
B. II only
C. III only
D. I and II only
E. I, II, and III
Computers and Technology
1 answer:
KengaRu [80]2 years ago
5 0

Answer:

What programming language is this

Explanation:

You might be interested in
Heeeeeeeelp :)<br> thx<br> jfdyiusjmkdsuiho;dmcvrvho;j
anastassius [24]

Answer:

I think option C is correct

7 0
3 years ago
Read 2 more answers
Which type of security software prevents, detects, and removes the malware program that tries to collect personal information or
kupik [55]

Answer:

Windows Defender Using Security Updates and Antivirus Software for Clients

Explanation:

Windows Defender is a software product from Microsoft that is intended to prevent, remove, and quarantine spyware in Microsoft Windows. This program helps protect your computer against pop-ups, slow performance, and security threats caused by spyware and other unwanted software by detecting and removing known spyware from your computer.

7 0
3 years ago
Read 2 more answers
Which functions are examples of logical test arguments used in formulas? Check all that apply. OR IF SUM COUNT NOT AND
slavikrds [6]

Answer:Sum functions() and Count functions() of logical test arguments used in formula .

Explanation:The Count () function returns the number of that rows match that a specified column.

Count (column_ Name)

table name

The count SQL Function finds the number condition.

SELECT COUNT(Condition Id)

FROM Condition;

The Sum () Function returns to the total sum number of columns.

SUM (Column_Name)

table name

The Sum SQL Function find the sum of the table.

3 0
3 years ago
Read 2 more answers
Maria is developing an online gaming website. She is working on an interactive game that has a central character guiding the vis
Nuetrik [128]
I assume it would be audio since it’s interactive..
3 0
3 years ago
Read 2 more answers
PLEASE ANSWER LAST DAY OF SCHOOL. Discussion Topic
meriva

Answer:

You can't really say it matters whether it's short or long

Explanation:

There several coding language some short and some long with different purposes so it doesn't really make a difference

Although some coders have been able to shorten some codes so I'd say shorter is faster and be[er and easier to memorize

Thanks hope I was helpful

4 0
2 years ago
Other questions:
  • OSHA requires that employers pay for most required personal protective equipment (PPE), including: A. Hard hats B. Logging boots
    5·1 answer
  • What does the picture indicate on the famous book “Dawn of the century”?​
    10·1 answer
  • How might writing an online journal be different than writing in a paper one ​
    15·2 answers
  • You have users who connect to the corporate network using their laptops. because these computers often access confidential data,
    9·1 answer
  • Ask the user to enter the number of elements in a list of numbers. Take in the numbers from the user and then output the list th
    6·1 answer
  • What are three requirements of information technology a. Accuracyb. _______________________________c. __________________________
    13·1 answer
  • The command button to protect a document is part of the​.
    10·1 answer
  • You are given an integer N, followed by N lines of input (1 &lt;= N &lt;= 100). Each line of input contains one or several words
    8·1 answer
  • Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller
    12·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!