Well if we are talking about programming, then I would use a set.
Load the content of the bag into a set, try to take out all the numbers from 1 to 100, if the operation fails the number is not in...
Type: Posts; User: banatibor
Well if we are talking about programming, then I would use a set.
Load the content of the bag into a set, try to take out all the numbers from 1 to 100, if the operation fails the number is not in...
Hi,
The interface definition is incorrect IMHO. It should look like this.
public interface Vehicle<T> {
public T copy();
}
public class Car implements Vehicle<Car> {
I do not think this is possible.
It wouldn't be a problem during compile, but in runtime the type of T is unknown. Thank to java's type erasure of generics to provide backward compatibility.
As I...