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 / June 2006

Tip: Looking for answers? Try searching our database.

interface

Thread view: 
kritisaxena@gmail.com - 21 Jun 2006 11:57 GMT
what is the difference between interface and a class
Ed Kirwan - 21 Jun 2006 12:34 GMT
> what is the difference between interface and a class

Sally's really hungry so she pops down to the high-street. Feeling a
little wild (especially after the night before), she decides to turn off
at Blessington Street, which she's heard of but has never visited.

After passing a small post-office and hair-dressing salon, she comes to,
 "Hong's Chinese Restaurant;" through the slightly tinted glass it
looks perfectly cosy, and about half-full. She reads the menu framed at
the door, which, to her surprise, offers only three dishes:

- Duck in black bean sauce.
- Chicken with fried noodles.
- Beef with dumplings.

She had never liked the taste of chicken, and has always found duck too
be too fatty, but she had always loved beef, and dumplings were
absolutely scrummy.

She's just about to enter when she notices, just next-door, another
Chinese restaurant, "NianShan's". Curious, she moves along and looks in
the window - the place looks a little crazy: almost all the tables are
filled, waiters are running everywhere with huge platters under orders
barked by a furious-looking maitre d', and a strange East-West music mix
is pumping in the smokey air.

She reads the menu pasted to a sandwich board outside the door, and is
surprised to find that it, too, offers only the same, three dishes:

- Duck in black bean sauce.
- Chicken with fried noodles.
- Beef with dumplings.

She thinks about this for a moment and happens to glance a little
further along, only to see - to a by-now growing suspicion - yet another
Chinese Restaurant right beside the second. This one's called, "Xiaoling's."

She walks to it but finds the glass heavily tinted; curiosity too great,
she presses herself against the glass, blinkering her eyes with her
hands to peer inside. There, she sees a beautiful, minimalist, all-white
and almost empty restaurant. A single person each sits at two tables,
neither moving, and a waiter stands in the middle of the room, eyes
closed. She sees joss-sticks burning to one side and, towards the back,
a fabulous, calm shrine to some unknown god rides on an altar of wreaths.

She reads the brass-plate holding the menu beside the door and is
somewhat unsurprised to see that it offers only the same, three meals:

- Duck in black bean sauce.
- Chicken with fried noodles.
- Beef with dumplings.

She steps back and thinks a little. There's no way she can pass without
trying one of the restaurants, that's for sure; this third restaurant is
a little too calm for her mood right now, though the second resaurant
feels a little too wild, so she returns to the first restaurant and
inches inside.

She is greeted pleasantly and led to a table where she orders the beef
with dumplings. When it arrives, the dish is well-presented and steaming
hot; it tastes simply delicious.

The next day, she goes to the second restaurant - the crazy one - and
orders the same dish, beef with dumplings; although it has the same name
as the meal she ate the day before, it looks totally differnent: the
beef is much more coarsely-sliced and the dumplings are gigantic; it is,
however, perhaps a little too spicy - she admits to herself that she
prefers the meal of the day before - but she can't argue that it was,
indeed, beef with dumplings.

She doesn't go to the third restaurant the following day because of a
lunch-time date, but on the fourth day she goes straight to the third,
minimalist restaurant and orders the beef with dumplings. The dish
served to her cannot be any more different than the first two: as
minimalist as the surroundings, the beef is sliced into long threads and
arranged parallel with one another, and the dumplings are shaped into
seven different, geometric forms. It tastes good, though not as good as
it looks, and again she can't argue that it was, indeed, beef with
dumplings.

Three dishes, all with the same name, yet totally different.

Before she leaves the restaurant, she whips out her trusty laptop (to
the waiter's quietly veiled horror), accesses the web via her
less-than-trusty wireless connection, and downloads the latest question
from comp.lang.java.programmer.

It is a question entitled, "Eclipse project structure."

Signature

www.EdmundKirwan.com - Home of The Fractal Class Composition.

Download Fractality, free Java code analyzer:
www.EdmundKirwan.com/servlet/fractal/frac-page130.html

Chris Uppal - 21 Jun 2006 13:03 GMT
> [snipped tale of Chinese restaurants]

Now I'm hungy :-(

> It is a question entitled, "Eclipse project structure."

That's more Zen than I can cope with on an empty stomach ;-)

   -- chris
Moiristo - 21 Jun 2006 14:17 GMT
> what is the difference between interface and a class

From a book:

'An interface can be used to define a restricted view of a group of
objects, or to specify a minimal set of features a group of objects is
expected to have for some particular purpose.'

A class can be an implementation of an interface; an interface itself
doesn't contain implementations. An abstract class can be seen as a
combination between a class and an interface. Im not an expert though :x


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.