Re: Чому так? або 100 питань по Java
Перекладаю на Java:
Object a = null, b = null, c = null, d = null;
Object vals[] = {a,b,c,d};
Object nulls[] = new Object[ vals.length ];
if( Arrays.equals( vals, nulls ) )
System.out.println("All nulls");
if( Arrays.asList(vals).contains( null ) )
System.out.println("At least one null");