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]
3 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]3 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]3 years ago
3 0

Answer:

Please see attachment

Explanation:

Please see attachment

You might be interested in
What read a page on website​
katovenus [111]

Answer:

Dino

Explanation:

3 0
2 years ago
I need help!
tekilochka [14]
True!!!!!!!!!!!!!!!!!
6 0
2 years ago
Complete a graphic organizer to explain the responsibilities of a borrower
Blizzard [7]
A borrower is a computer expert, create interest and pay a certain percentage
5 0
3 years ago
Which of the actions below will not create more room on your hard drive?
slavikrds [6]
A. defragging your hard drive
4 0
2 years ago
Public class Bird
Anna007 [38]

Answer:

Answer below.

Explanation:

You are creating an object of bird "b" with a talon strength of 5 and a beak of 5.

public Hawk(int talon, int beak)

{

super(beak);

talonStrength = talon;

}

Please mark brainliest if this is the answer you were looking for

Please mark brainliest if this is the answer you were looking for

6 0
3 years ago
Other questions:
  • How to eject a flash drive from chromebook?
    6·1 answer
  • After placing her insertion point after Grandma’s Kitchen, order the steps Danica needs to follow to insert and format the regis
    8·2 answers
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • Tom and his brother caught 100 finish on a weeklong fishing trip. The total way of the fish was 235 pounds. What is the weight o
    9·1 answer
  • + Use for loop to print numbers from 100 to 10
    11·1 answer
  • MULTIPLE COICE! BRAINLIEST
    12·1 answer
  • The _____________computer function accepts data from input devices and sends it to the computer processor.
    11·1 answer
  • Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
    12·1 answer
  • What is a for command? can u use a variable instead of a number in the for command!<br>​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!