(int[]) (int[])
是做什么用的?Java double cast(int [])(int [])
private Object[] slots = new Object[8192];
int[] block = (int[]) (int[]) this.slots[0];
(int[]) (int[])
是做什么用的?Java double cast(int [])(int [])
private Object[] slots = new Object[8192];
int[] block = (int[]) (int[]) this.slots[0];
在这种情况下,第二次演员什么都不做。这是一样的打字
private Object[] slots = new Object[8192];
int[] block = (int[]) this.slots[0];
block = (int[]) block;
编辑:
为了澄清,“第二”剧组,我指的是左边的一个。
没有什么'(int [])'不做。 – 2012-07-30 14:01:24
你有一个冗余的铸件。 – Nishant 2012-07-30 14:01:45
您将此slot [0]转换为int [],然后再次执行此操作。 – Matthias 2012-07-30 14:02:40