How to print multiple variable lines in Java

前端 未结 5 1742
北荒
北荒 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条回答
  •  温柔的废话
    2021-01-03 19:52

    Suppose we have variable date , month and year then we can write it in the java like this.

    int date=15,month=4,year=2016;
    System.out.println(date+ "/"+month+"/"+year);
    

    output of this will be like below:

    15/4/2016

提交回复
热议问题