Java Lab: Remove Spaces

preview_player
Показать описание
----------------------------------------------------------------------------------------
Social media:
----------------------------------------------------------------------------------------

Code in comments
Рекомендации по теме
Комментарии
Автор

import java.util.Scanner;

public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
String userInput = scnr.nextLine();
for (int i = 0; i < userInput.length(); i++) {
if (userInput.charAt(i) != ' ') {

}
}

System.out.println();

}
}

collegehelper
welcome to shbcf.ru