[android-developers] Re: Is this template in java

2011-12-01 Thread HighFlyer
Yes, its templates. Java use 'generics' term

On 1 дек, 18:15, "SL@maxis"  wrote:
> Java format:
>
>    ArrayAdapter(Context context, int textViewResourceId, List objects)
>
> Is the above template like in C++ ?
>
> I have a 15-year Java book; I think there is no such thing in there.
>
> I did a little search on net, but did not see documents explaining the
> above.
>
> Thanks.
>
> --
> Using Opera's revolutionary e-mail client:http://www.opera.com/mail/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Is this template in java

2011-12-01 Thread SL

Not really.  The confusion between Java generics and C++ templates causes
more trouble than it explains things.  When you come right down to it,  
the
only thing in common is the angle-bracket syntax.  It's very misleading  
to

say that Java generics are like C++ templates.

For that matter, it's pretty misleading to say that anything in Java is
like its counterpart in C++.  In Java pointers are called "references"  
and

behave very differently from C++ pointers or references.  Garbage
collection works differently from destructors.  The memory model is
different.  And so on.


Not only that, but almost nothing from 1996 Java applies today.  You  
don't
use 'Vector' or 'Hashmap' any more, you have Swing (well, not for  
Android),

a new threading model, generics, 'assert', for:each, enums, ...

OMG!  The list is HUGE what's missing from a 15-year-old reference.  So
much that it is essentially useless for a budding Android programmer.


> I did a little search on net, but did not see documents explaining the
> above.



http://lmgtfy.com/?q=Java+tutorial



Mine, I am reading a 15-year old book (from a friend) to catch up on Java.

I think you have over-emphasized somewhat, it can't be that nothing  
applies.


On second thought, may be I should sue my friend for (may be intentionlly  
) misleading me.


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Is this template in java

2011-12-02 Thread Lew
On Friday, December 2, 2011 2:52:31 PM UTC-8, SL wrote:
>
> ... 

> Not only that, but almost nothing from 1996 Java applies today.  You  
> > don't
> > use 'Vector' or 'Hashmap' any more, you have Swing (well, not for  
> > Android),
> > a new threading model, generics, 'assert', for:each, enums, ...
> >
> > OMG!  The list is HUGE what's missing from a 15-year-old reference.  So
> > much that it is essentially useless for a budding Android programmer.
>
> [snip]
>
> Mine, I am reading a 15-year old book (from a friend) to catch up on Java.
>
> I think you have over-emphasized somewhat, it can't be that nothing  
> applies.
>
I am not over-emphasizing.  I didn't say that nothing applies, I said that 
a 1996 book is essentially useless.  Does it even mention nested classes, 
which IIRC didn't exist in Java in 1996?

You underestimate the changes.  Java 1.1 was pretty much a different 
language from 1.0, adding inner classes and reflection.  1.2 introduced 
significant library changes.  1.4 brought in a new keyword, NIO, and other 
changes.  Java 5 once again pretty much reinvented the language, and 
changed the fundamental memory model.

You would do well not to be so dismissive of accurate information.

On second thought, may be I should sue my friend for (may be intentionlly  
>
> ) misleading me.
>
You would do well not to be so dismissive of accurate information.

-- 
Lew
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en