Tuesday, 2 April 2013

Array - 14





// very very imp
public class TechnoSample
{
static Object theObj;
static Object[] someObj;
static String letters[]={"A","B","C","D"};
static char[] caps={'A','B','C','D'};
// static char caps ;
public static void main(String args[])
{
someObj=new Object[3];
int[] theInts=null;
// int theInts;
//what can go here?


// theInts=caps;
// theObj=theInts;
// someObj=theInts;
theObj=letters;
// theObj=caps;
System.out.println(theObj);//[C@df6ccd,[Ljava.lang.String;@df6ccd
}
}

No comments:

Post a Comment