I have object array which contain some values. I want to convert this array of object to user defined custom class.
EX : Object[] obj = new Object[4];
obj[0] = "one";
obj[1] = "two";
It is possible to convert this object to Employee object by setting obj[0] to setFName and obj[1] to setLName using stream api of java8. I tried couple of ways but getting error.
output would be
Employee e = Stream.of(Obj).map().....
something like above
Object[]to some custom class, then you could add a constructor to the custom class to do this.stream reduce. But really, it look like bad design.