How to print multiple variable lines in Java

前端 未结 5 1720
北荒
北荒 2021-01-03 19:38

I\'m trying to print the test data used in webdriver test inside a print line in Java

I need to print multiple variables used in a class inside a system.out.pr

5条回答
  •  -上瘾入骨i
    2021-01-03 19:59

    You can do it with 1 printf:

    System.out.printf("First Name: %s\nLast Name: %s",firstname, lastname);
    

提交回复
热议问题