在Java中,可以通過以下兩種方式來定義空數組:
int[] emptyArray = new int[0];
int[] emptyArray = {};
這兩種方式都可以定義一個空數組,但在實際開發中,建議使用第一種方式來定義空數組。