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
Class 00 rubber gloves are used when working with voltages less than​ _____.
Radda [10]
Answer: 500 volts AC, 750 volts DC
Class 00 rubber gloves are given the color "beige" based on the color code of rubber gloves.
The proof test voltage for this class of rubber gloves is 2500 volts of AC voltage and 10000 volts of DC voltage
4 0
3 years ago
Is anyone else excited for sephiroth (I think I spelt it wrong) in smash. And if you arn't are you excited for christmas
Fed [463]

Answer: idek what that is but okay ;v;

7 0
3 years ago
What version of ubuntu is linux mint 17.3 based on?
aliina [53]
It would be version 14.04! I run Ubuntu Linux on my pc with dual boot with Kali Linux! I hope this helped!

3 0
3 years ago
Why did the Apostles choose deacons to help them?
Lena [83]

Answer:

Idk

Explanation:

Ikd

7 0
2 years ago
IF YOU GET 5/5 RIGHT YOU WILL GET BRAINLIEST AND 50 [POINTS
natta225 [31]

Answer:

The sort function

Explanation:

Because it will sort all the numbers.

4 0
2 years ago
Read 2 more answers
Other questions:
  • Jail and prison officials may generally limit inmate rights when the limitations serve
    13·2 answers
  • End-user development: the process by which an organization's non-it specialists create software applications.
    8·1 answer
  • If you have a list of words that you wish me to make into a bulleted list, you must first highlig or ______ The words with the c
    13·1 answer
  • Select two netiquette guidelines. In a paragraph of no less than 125 words, explain why these guidelines make professional onlin
    9·1 answer
  • Can a spreadsheet be filtered only by one column at a time?
    11·1 answer
  • Pick one of the following scenarios and
    6·1 answer
  • This is gonna be very long but I have no idea what to do, I'm confused.
    6·1 answer
  • You can use tables for layout work. However, in XHTML, each form control should have its own ______ element
    12·1 answer
  • Help101111 avatar can we be friend's please? My name is Keegan. what is yours?
    12·1 answer
  • Project light with a system of lenses used for projecting slides or film into a screen.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!