Java中输出整个数组的方法有以下几种:
1. 使用Arrays类的toString()方法:
```java
int[] arr = {1, 2, 3, 4, 5};
System.out.println(Arrays.toString(arr));
```
2. 使用for循环遍历数组:
```java
int[] arr = {1, 2, 3, 4, 5};
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
System.out.println();
```
3. 使用增强for循环遍历数组:
```java
int[] arr = {1, 2, 3, 4, 5};
for (int num : arr) {
System.out.print(num + " ");
}
System.out.println();
```