java 8 multiline string example

preview_player
Показать описание
Code and details:

multiline string examples in Java 8

In this video: Java multiline string

* StringBuilder
* StringBuilder and collection
* Java 8 streams and joining
* Java 8 join
* IntelliJ / Eclipse multiline java sting

---------------------------------------------------------------------------------------------------------------------------------------------------------------
Socials

If you really find this channel useful and enjoy the content, you're welcome to support me and this channel with a small donation via PayPal and Bitcoin.

Bitcoin: 1DBZu6N9JTpRDdc9QChLZnX3v2iVRaQ4ym
Рекомендации по теме
Комментарии
Автор

Помогите пожалуйста решить задачу .
Your program should read all the words (or numbers) from the five lines and output "The form for first name is completed. We will contact you if we need a chef that cooks cuisine preference dishes."

Sample Input 1:

Eugene
33
secondary
8
fusion
Sample Output 1:

The form for Eugene is completed. We will contact you if we need a chef that cooks fusion dishes.



public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String name = scanner.next(); //Nick
int age = scanner.nextInt();// 25
scanner.nextLine();
String education = scanner.next(); //secondary
int experience = scanner.nextInt(); //3
scanner.nextLine();
String fusion = scanner.next();
String dishes = scanner.next();
System.out.println("The form for " + name + " is completed. We will contact you if we need a chef that cooks" + fusion + dishes);
Это оказалось неправильно. Не могу поместить на одну строку input два слова fusion dishes

Mr.J