Search:

Type: Posts; User: banatibor

Search: Search took 0.08 seconds.

  1. Re: Given an array of numbers from 1 to 100 with exactly k numbers missing, find the missing numbers.

    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...
  2. Replies
    3
    Views
    2,396

    Re: Should Java have a "this" type parameter?

    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> {
  3. Re: Generic class - get T info or class name

    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...
Results 1 to 3 of 3