type mismatch category generics
i have following formula won't accumulate nonetheless there proceed accumulate i wish know since isn't compiling. someone illuminate me personally since i blunder summary i post during finish please?
public category exam {
open stationary vacant main(string args[]) {
exam t = new test();
t.testt(null);
}
open <t extends test> vacant testt(class<t> type) {
class<t> testtype = form == zero ? test.class : type; //error here
system.out.println(testtype);
}
}
type mismatch: can't modify class<capture#1-of ? extends test> class<t>
by casting test.class class<t> compiles an unchecked cast warning runs perfectly.
Comments
Post a Comment