Which formate I should use in CCA 175 exam

cca-175
apache-spark
scala
bigdatalabs
certification

#1

Which one should I use in CCA 175 exam in order to save the data in text file format.

  1. d.map(x=>x.mkString("|")).saveAsTextFile("/user/cloudera/problem3/all/customer/output")

  2. d.map(x=> x(0)+"|"+x(1)+"|"+x(2)+"|"+x(3)).saveAsTextFile("/user/cloudera/problem3/all/customer/output")

If both are same, can we use 1st one in exam, please clarify my doubt