Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

few questions about java languages

Thread view: 
Neo - 21 May 2007 12:52 GMT
Hi,

I have few questions about Java languages, these are following.

1) Is function allow us to write inner function?
2) Is anonymous inner class exist??

Please give us answer in detail.

Regards,

-aims
Lew - 21 May 2007 14:49 GMT
> I have few questions about Java languages, these are following.

One would normally say the Java "language", but I can see how one might
consider that there are more than one.

> 1) Is function allow us to write inner function?

No, but you can get somewhat the same effect by using a functor class, that
is, an implementation of an interface that has a method that is different for
different subclasses.

<snippets>
interface Executor
{
  void execute();
}
...
public void someFunc( Executor x )
{
  x.execute();
}
</snippets>

> 2) Is anonymous inner class exist??

Yes, if you mean, "Does Java support anonymous inner classes?"

Signature

Lew

Neo - 22 May 2007 15:59 GMT
Thanks Lew! :)

Regards,

-aims


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.