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
liberstina [14]
4 years ago
13

Assume that word is a variable of type String that has been assigned a value. Assume furthermore that this value always contains

the letters "dr" followed by at least two other letters. For example: "undramatic", "dreck", "android", "no-drip". Assume that there is another variable declared, drWord, also of type String. Write the statements needed so that the 4-character substring word of the value of word starting with "dr" is assigned to drWord. So, if the value of word were "George slew the dragon" your code would assign the value "drag" to drWord. Submit

Computers and Technology
2 answers:
Valentin [98]4 years ago
5 0

Answer:

   String word = "George slew the dragon";

   

   int pos = word.indexOf("dr");    

   String drWord = word.substring(pos, pos+4);

   

   System.out.println(drWord);

Explanation:

Assuming dr is always there, we don't have to check the validity of 'pos'. Normally, you would!

Mazyrski [523]4 years ago
3 0

Answer:

Please see attachment

Explanation:

Please see attachment

You might be interested in
An attribute whose value uniquely identifies an object is called a(n) _______.​
Juliette [100K]
This is called a key attribute!

There are different types of key attributes!

Primary key is the key that is actually chosen, for example a social security number. 

There is also a unique key, say our finger prints! they also uniquely identify humans, but usually we prefer to use social security number when we list people (a unique key could be a primary key if we chose so)

We could also identify people by their social security number and a name, but this is unnecessary, as social security number already gives a full identification. Such a reduntant key is called super key. 
6 0
3 years ago
What department is cyber security
Paul [167]

Answer:

United States Department of Homeland Security

The National Cyber Security Division (NCSD) is a division of the Office of Cyber Security & Communications, within the United States Department of Homeland Security's Cybersecurity and Infrastructure Security Agency.

<em>Give</em><em> </em><em>me</em><em> </em><em>brainliest</em><em> </em>

8 0
3 years ago
Read 2 more answers
The n modifier after the tilde forces the index variable to expand only to the ______
KATRIN_1 [288]

Answer: filename and extension.

Explanation:

Suppose we have %~nxa, where we have two modifiers n and x, and a single variable a.

So, the n modifier after the tilde forces the index variable to expand only to the  filename(by the n modifier) and the extension(by the x modifier).

It produces the filename and extension instead of the full path.

5 0
3 years ago
A(n) ___ operating system is a very fast, relatively small os. it is designed to respond to hardware and program requests almost
nataly862011 [7]
<span>A real-time operating system is a very fast, relatively small os. it is designed to respond to hardware and program requests almost instantly.</span>
3 0
3 years ago
At the coffee shop where they work, Jen is the safety officer, Richard is in charge of administering first aid, Ashley is respon
Dafna1 [17]
They have etablished a good first aid system.
7 0
3 years ago
Read 2 more answers
Other questions:
  • HELP PLEASE
    7·2 answers
  • Linguist study
    9·1 answer
  • Write a function max arguments. write a program that reads three floating-point numbers, uses the max function, and displays the
    5·1 answer
  • A(n) ________ is a variable that receives an argument that is passed into a function. global argument scope parameter
    15·1 answer
  • In which of the following scenarios would it be best to use a for loop?
    6·1 answer
  • At each layer of the OSI model, data is appended to the original message and then sent on to the next lower layer. What is this
    10·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    7·1 answer
  • In the table below, identify the data type that would be most suitable for the second field.
    10·2 answers
  • What kind of skill is persuasion?
    7·1 answer
  • Using computers can lead to a number of physical safety issues. State and explain TWO(2) of these types of issues.​​​​​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!