Core Spring Data
Written by: Oliver Gierke
Featured Refcardz: Top Refcardz:
  1. Git
  2. Prep for CD
  3. DNS
  4. Data Mining
  5. Spring Data
  1. Data Mining
  2. Spring Data
  3. DNS
  4. Machine Learning
  5. MongoDB

Link Details

Link 880475 thumbnail
User 1073519 avatar

By lokeshgupta1981
via howtodoinjava.com
Submitted: Nov 20 2012 / 10:53

Don’t you feel that Java should have a more convenient syntax for collections (lists, maps, sets, etc.). The reason I am saying this is because every time if you have you use a collection in your code then every time you have to do multiple things.
  • 1
  • 1
  • 206
  • 113

Comments

Add your comment
User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

Would be better if any of it would compile

User 1073519 avatar

lokeshgupta1981 replied ago:

0 votes Vote down Vote up Reply

@blood, useParamsInSomeMethod() method is symbolic in sense that you can define some method and pass expression as parameter. I thought that writing whole method will be like spoon feeding. Anyways, I will update the post.

User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

My point is that the first example won't compile, nor will the second, nor will the third... Never mind the missing method definition, you need add not params.add

User 1073519 avatar

lokeshgupta1981 replied ago:

0 votes Vote down Vote up Reply

Updated the post.

User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

Cool. Now only the first example won't compile instead of all 3... It's a step in the right direction

User 1073519 avatar

lokeshgupta1981 replied ago:

0 votes Vote down Vote up Reply

I am sorry, but i compiled and copied the code from IDE. Can you please let me know why it wouldn't.

User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

My mistake, I got confused by the complete lack of code indentation. All the code should compile now

User 1073519 avatar

lokeshgupta1981 replied ago:

0 votes Vote down Vote up Reply

Thanks for pointing out the mistakes. I really appreciate.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (1)