![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 20.02.2020 17:02 azibur3191
Write code that inserts userItems into the output string stream itemsOSS until the user enters "Exit". Each item should be followed by a space. Sample output if user input is "red purple yellow Exit":
red purple yellow
import java. util. Scanner;
import java. io. PrintWriter;
import java. io. StringWriter;
public class StringStreamOutput {
public static void main (String [] args) {
Scanner scnr = new Scanner(System. in);
String userItem = "";
StringWriter itemCharStream = new StringWriter();
PrintWriter itemsOSS = new PrintWriter(itemCharStream);
System. out. println("Enter items (type Exit to quit):");
userItem = scnr. next();
while (!userItem. equals("Exit")) {
/* Your solution goes here */
userItem = scnr. next();
}
userItem = itemCharStream. toString();
System. out. println(userItem);
return;
}
}
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 23:30
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in a. advanced mode. b. automatic mode. c. basic mode. d. typeover mode
Answers: 1
You know the right answer?
Write code that inserts userItems into the output string stream itemsOSS until the user enters "Exit...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 19.10.2021 01:00
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 19.10.2021 01:00
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/istoriya.png)
History, 19.10.2021 01:00
![question](/tpl/images/cats/mat.png)
Mathematics, 19.10.2021 01:00
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.10.2021 01:00
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.10.2021 01:00
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)