▁a ▁is ▁a ▁single - element ▁array ▁of ▁String ▁String [] ▁a ▁= ▁new ▁String [ 1 ]; ▁ ▁// ▁b ▁is ▁an ▁array ▁of ▁Object ▁Object [] ▁b ▁= ▁a ; ▁ ▁// ▁Ass ign ▁an ▁Integer ▁to ▁b . ▁This ▁would ▁be ▁possible ▁if ▁b ▁really ▁were ▁// ▁an ▁array ▁of ▁Object , ▁but ▁since ▁it ▁really ▁is ▁an ▁array ▁of ▁String , ▁// ▁we ▁will ▁get ▁a ▁java . lang . Array Store Exception . ▁b [ 0 ] ▁= ▁ 1 ; ▁ ▁In ▁the ▁above ▁example , ▁one ▁can ▁read ▁from ▁the ▁array ▁( b ) ▁safely . ▁It ▁is ▁only ▁trying ▁to ▁write ▁to ▁the ▁array ▁that ▁can ▁lead ▁to ▁trouble . ▁ ▁One ▁draw back ▁to ▁this ▁approach ▁is ▁that ▁it ▁leaves ▁the ▁possibility ▁of ▁a ▁run - time ▁error ▁that ▁a ▁str ic ter ▁type ▁system ▁could ▁have ▁caught ▁at ▁compile - time . ▁Also , ▁it ▁hur ts ▁performance ▁because ▁each ▁write ▁into ▁an ▁array ▁requires ▁an ▁additional ▁run - time ▁check . ▁ ▁With ▁the ▁addition ▁of ▁gener ics , ▁Java ▁and ▁C # ▁now ▁offer ▁ways ▁to ▁write ▁this ▁kind ▁of ▁polym orph ic ▁function ▁without ▁re lying ▁on ▁cov ar iance . ▁The ▁array ▁comparison ▁and ▁sh uff ling ▁functions ▁can ▁be ▁given ▁the ▁parameter ized ▁types ▁ ▁< T > ▁boolean ▁equal Array s ( T [] ▁a 1 , ▁T [] ▁a 2 ); ▁< T > ▁void ▁sh uffle Array ( T [] ▁a ); ▁ ▁Alternatively ,