Re: Java vs C++
On 02/06/2011 06:26 PM, Lawrence D'Oliveiro wrote:
In message<iil9uk$b6m$1@news.eternal-september.org>, Joshua Cranmer wrote:
It's not the same syntax. List<String> is the type of a specific
instance, while the class still remains List.
List<String> is a class, not an instance. In something like
List<String> L;
it is L that is the instance.
L is an instance of a class. List<String> is an instance of a type, a
type that is distinct from List (the raw type or the class type).
If you're having this much problems understanding me, I'm sure you'll be
having lots of fun when it comes to capture conversion. Just because two
variables have type List<? extends Number> doesn't mean that they have
the same type. ;-)
See, how can you try to tell me what the difference is between Java and C++,
when you don???t understand it yourself?
I do very much understand it myself. My problem is that you have such a
broken understanding of Java that the terminology I normally use to
explain stuff is lost on you. Java is not C++, so don't come in with
your preconceived notions of C++ and argue that they should apply to Java.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth