Ad
  • Custom User Avatar

    How to print an array in Java google is your friend, remember to write your imports.

  • Custom User Avatar

    If it doesn't compile, it's not the print statements that cause it, but something else in your code. Also you should specify the language you're using with these kind of questions.

    I'm assuming you're using java, so in general you can use System.out.println() for primitives. To print arrays you can use something like: System.out.println(Arrays.toString(arr)) (don't forget to include import java.util.Arrays at the top)

  • Custom User Avatar

    Yes exactly, facing the same problem

  • Custom User Avatar

    Yes, printing it yourself.