Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-05-2008, 10:02 AM
Member
 
Join Date: Jul 2008
Posts: 6
bukake is on a distinguished road
Can a method take itself as parameter?
Can a method take itself as parameter? Recursive method maybe. And whats the new feature in 1.7 release. Someone told me it was something with calling multiple methods, or maybe taking other methods as parameters. Any info on thisone?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-05-2008, 11:45 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,545
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I don't know about passing a method as a parameter to a method itself. Maybe you are talking about recursive method. Can you specifically say what exactly you want to do.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 09-05-2008, 04:25 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
A method doesn't have a type, so I don't see how it could be passed as a parameter to another method. How would you define the called method?

public void calledMethod(PassedMethod pm) {...

Then what would its parameters be if you call it?
pm(<someargs???>);

Its always possible for new syntax to be added to java. This could be defined in future versions of java.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 09-05-2008, 06:53 PM
Senior Member
 
Join Date: Aug 2008
Posts: 178
Supamagier is on a distinguished road
Maybe he means:
Code:
String length = getStringLength(textField.getText());
where getStringLength is a non-existing method...
__________________
check out
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
, 100% made by me.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 09-05-2008, 07:31 PM
Member
 
Join Date: Jul 2008
Posts: 6
bukake is on a distinguished road
I guess it is the closures that are proposed to be added in the new versions. My teacher said something about adding very powerful stuff in the new version, but it was something to do with the methods passing as arguments in other methods, I'm not really sure. Or maybe multiple inheritance. Its all mashup now in my head with this Java thing. Tnx for the replies
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 09-05-2008, 09:27 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,545
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I don't think new version has this kind of feature at all. I search on the Suns' official web site, but didn't found such thing.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 09-06-2008, 06:03 AM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 876
Fubarable is on a distinguished road
I have heard of closures as a possible addition to the next version.

As for method parameters, these can be implemented in a sideways fashion using interfaces. We do this with Runnables all the time.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 09-06-2008, 12:03 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,545
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
If so, it's interesting actually. I'm waiting to test it.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 09-06-2008, 04:11 PM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 876
Fubarable is on a distinguished road
then why not have a read (interesting stuff!): Closures for the Java Programming Language
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 09-06-2008, 09:29 PM
Member
 
Join Date: Jul 2008
Posts: 6
bukake is on a distinguished road
Nice link. I need to get my routine with some more basic stuff until i get there. Imo you need to decide when it's time to stop learning, i think many would disagree on that. But with all these new features, aspect programming etc its just another way to get things done, with less code maybe.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 09-06-2008, 11:26 PM
Fubarable's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 876
Fubarable is on a distinguished road
Quote:
Nice link. I need to get my routine with some more basic stuff until i get there.
Don't rush. Closures are not part of Java yet, so there's nothing to "get to" just yet!
Quote:
Imo you need to decide when it's time to stop learning, i think many would disagree on that.
I don't disagree at all. I think you should stop learning when you're dead. I'm in no rush.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving a parameter through URL. hisouka Java Servlet 1 09-06-2008 02:45 PM
how to read a url parameter to query a database kwesiaryee JavaServer Pages (JSP) and JSTL 1 09-01-2008 04:38 PM
Passing short value as parameter javanewbie83 New To Java 16 07-16-2008 07:27 AM
Input parameter of Main method Java Tip Java Tips 1 07-12-2008 08:24 PM
arugment/parameter ravian New To Java 5 01-04-2008 11:43 AM


All times are GMT +3. The time now is 02:28 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org