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
In Scratch, you have to choose backdrops from a limited number in the Scratch image library.
forsale [732]
I would say it would be True
5 0
3 years ago
A network of Bennetton retail sales agents select the Bennetton designs that they feel will appeal to Bennetton retail customers
denpristay [2]

Answer:

It is an example of a matrix structure

Explanation:

The matrix structure is a structure in which jurisdiction, controls and duties are carried and uphold by a group of employees instead of just the manager.

In other words, employees have dual reporting relationships; they can give reports to the functional manager and they can also give reports to the product manager.

The Bennetton design selected by the network of Bennetton retail sales agents made activities to be easily coordinated because, they have collectively performed the duty as a unit and this is one of the advantages of this form of the matrix organizational structure.

7 0
3 years ago
Read 2 more answers
Mr. Andrews, the lead programmer for the game New Horizons, hires independent testers to check the game for stability and perfor
NikAS [45]
I think “D”, did I help?
5 0
3 years ago
Read 2 more answers
Please select all examples of systems using guided media. Group of answer choices ADSL 802.11 Wifi Home Networks Global Position
dusya [7]

Answer:

- ADSL.

- Ethernet Home Networks.

- Fiber Optics.

- Cable Television.

Explanation:

In Computer, Guided media also known as bounded media involves the use of cable such as fibre-optic cables, coaxial cable to transmit data signals from one system device to another.

Examples of systems using guided media are;

- ADSL.

- Ethernet Home Networks.

- Fiber Optics.

- Cable Television.

7 0
3 years ago
When should you integrate technology?​
earnstyle [38]
Nolur acil lütfen yalvarırım yalvarırım lütfen yalvarırım when should you integrate technology?
5 0
3 years ago
Read 2 more answers
Other questions:
  • How to revert a dismissed javascript popup alert box in chrome?
    5·1 answer
  • What does media saturation mean?
    15·1 answer
  • When classified data is sent over an unclassified network, what is this incident called?
    5·1 answer
  • Create a program in c/c++ which accepts user input of a decimal number in the range of 1 -100. Each binary bit of this number wi
    9·1 answer
  • What device provides ports to allow a laptop to easily connect to a full-sized monitor, keyboard, ac power adapter, and other pe
    11·1 answer
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • The local city youth league needs a database system to help track children that sign up to play soccer. Data needs to be kept on
    10·2 answers
  • What are the benefits of writing functions that use parameters and return List 2 please and explain what is return
    12·1 answer
  • The economic importance of computer viruses​
    14·2 answers
  • Steps for Saving and opening a document.​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!