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

c) Describe the relationship between ∠E and ∠K. What is the measure of ∠K? (1 point)
Trigonometry Problem, please help and explain
Lenny bought x shares of stock for Sy per share last month. He paid his broker a flat fee of $20. He sold the stock this month for Sp per share, and paid his b
help ASAP!!!!!!!!!!!!!!!!!!!!!!
How did the radical republicans' approach to reconstruction differ from lincoln's?
A space shuttle can orbit the earth at 330 mi above sea level. The average commercial airplane can fly at 5.7 mi above sea level. What is the distance between t
write about your favourite item that isnt expensive but means alot to you​
The pH indicator bromothymol blue is an alkaline solution and yellow is an acidic solution. A slight increase in acidity. Such as when co2 gas is added, causes
Please explain this.
When an electr ic cur rent is passed through water , two colou r less gases are produced. When hydrogen gas makes a po pping sound in the presence of a blazing