So, I was writing a Java program and made a method create that accepted Object datatype variable. Here is the brief look
class FILO
{
ArrayList listFILO;
public void create(Object input)
{
Class<? extends Object> type=input.getClass();
if(type.isArray())
{
/*Problem starts here. I want to create an array with same datatype as
input but I can't get my head around it.*/
}
//...
}
}