You can do that if you want. When you call the method, it will work the same as System.out.println
, in most cases.
The problem is if you try this:
puts(new char[] {'h', 'e', 'l', 'l', 'o'});
If you do that with System.out.println
, you will get hello
. But if you do it with puts
, you get something like this:
[C@812f71
If you don't print char[]
s, you will be just fine.