ccaravello9067 ccaravello9067
  • 07-04-2020
  • Computers and Technology
contestada

Consider the Java segment: String line1 = new String("c = 1 + 2 + 3") ; StringTokenizer tok = new StringTokenizer(line1, delimArg); For the String line1 to have 4 tokens, delimArg should be ________.

Respuesta :

frknkrtrn
frknkrtrn frknkrtrn
  • 09-04-2020

Answer:

+=

Explanation:

StringTokenizer(line1, delimArg);  delimArg is the delimiter that is used to create tokens from line1. (It enables us to break the string in pieces)

If line1 is equal to c = 1 + 2 + 3 and we want to have four tokens, pieces, then we need to use += as a delimiter to have c, 1, 2, and 3 as pieces.

For example, if we used + as a delimiter, we would have 3 pieces: c=1, 2, 3

Answer Link

Otras preguntas

if you put $3200 in a savings account that earns 2.5% interest per year compounded quarterly, how much would you expect to have in that account in 3 years
The density of hydrogen is 0.0000899 . Which of the following would be a reasonable estimate of the density of hydrogen?
Will Medal!! What were two major effects of Odoacer's conquest of Rome?
How do fossils provide evidence that evolution has taken place?
What treaty ended the american revolution?
Which war revealed to the United States that it was unprepared for modern war mobilization
Someone please help me with this one !!
What solvent would you use to determine the density of zinc chloride?
how does the growth of walmart demonstrate the geographic concept of distance decay
Which of the following best explains the diversion of water to the symplastic route once it encounters the Casparian strip?