Question regarding Inrefaces:Please GUIDE.

A question regarding INTERFACES.
'Each interface definition constitutes a new type.
As a result, a reference to any object instantiated from any class
that implements a given interface can be treated as the type of
the interface'.
So :
interface I{}
class A implements I{
}Now,class A is of type I.Right?
Now,if class A implements more than one interface,then what
is the actual type of A?
For example:
interface I{}
interface R{}
class B implements I,R{
}What is now B's type? I or R? or both?

>
The class (that implements the interface) actually
defines the behavior, and the interface just serves as
a contract for that behaviorYes.
- a view.Call it that if you want, but it being "a view" doesn't take away is-a-ness.
IMHO, the 'types' are the classes, which qualify for
the 'is a' relationshipAs yawmark points out, your use of "type" is not consistent with the JLS. Regardless of how you want to define type, the face it that it makes sense to say "A LinkedList is a List" and "A String is (a) Comparable" etc. Additionally, the way I've always seen the is-a relationship described, and the way that makes the most sense to me, is that "A is-a B" means "A can be used where B is expected." In this respect, superclasses and implemented interfaces are no different.
(which is what the words "extends" and "implements"
strongly suggest)"Foo extends Bar" in plain English doesn't suggest to me that Foo is a Bar, but quite clearly, in the context of Java's OO model, it means precisely that.
"Foo implements Bar" in plain English doesn't suggest much to me. Maybe that Foo provides the implementation specified in Bar, and therefore can be used where a Bar is required, which is exactly what implements means in Java and which, as far as I can tell, is the core of what the is-a relationship is supposed to be about in general OO.

Similar Messages

  • HT5312 Dear I forget my security questions , could you please guide me

    Dear I forget my security questions , could you please guide me

    Contact Apple through iTunes Store Support, and explain that you have forgotten your 3 security questions, that you can reset your password, but doing so doesn't reset your security questions.
    Explain that after resetting your password, you are still asked for the answers you have forgotten, before you can gain access to My Apple ID > Manage your account > Password & security, which is where you need to be to change your answers.
    Remember, support will receive hundreds, if not thousands of requests per day, some from people trying it on, others with little explanation and others that are written extremely poorly. Take the time to explain your situation properly, be precise and concise, brief but comprehensive.

  • Question regarding Inheritance.Please HELP

    A question regarding Inheritance
    Look at the following code:
    class Tree{}
    class Pine extends Tree{}
    class Oak extends Tree{}
    public class Forest{
    public static void main(String args[]){
      Tree tree = new Pine();
      if( tree instanceof Pine )
      System.out.println( "Pine" );
      if( tree instanceof Tree )
      System.out.println( "Tree" );
      if( tree instanceof Oak )
      System.out.println( "Oak" );
      else System.out.println( "Oops" );
    }If I run this,I get the output of
    Pine
    Oak
    Oops
    My question is:
    How can Tree be an instance of Pine.? Instead Pine is an instance of Tree isnt it?

    The "instanceof" operator checks whether an object is an instance of a class. The object you have is an instance of the class Pine because you created it with "new Pine()," and "instanceof" only confirms this fact: "yes, it's a pine."
    If you changed "new Pine()" to "new Tree()" or "new Oak()" you would get different output because then the object you create is not an instance of Pine anymore.
    If you wonder about the variable type, it doesn't matter, you could have written "Object tree = new Pine()" and get the same result.

  • Hi, I want to downgrade from OSX LEOPARD to OSX TIGER but I have a few questions regarding this. My iMac is originally from 2007 it came preloaded with tiger. I have original install tiger discs version 10.4.10. Is it safe to downgrade or not please help

    Hi, I want to downgrade from OSX LEOPARD to OSX TIGER but I have a few questions regarding this. My iMac is originally from Sep 2007 it came preloaded with tiger. I have original install (2) tiger discs version 10.4.10.  I want to know if it is safe and what are the necessary steps to do so. Also by downgrading im wondering if a lot of apps nowadays support tiger for example I have photoshop version 5 and 4 these are very important to me. One last question does anyone know of any reliable virus protection for mac that doesnt slow down your computer? because I have read that a lot of them do so. If anyone can help me I would greatly appreciate it! Here are the specs for my iMac 
    Model Name:
    iMac
      Model Identifier:
    iMac7,1
      Processor Name:
    Intel Core 2 Duo
      Processor Speed:
    2 GHz
      Number Of Processors:
    1
      Total Number Of Cores:
    2
      L2 Cache:
    4 MB
      Memory:
    2 GB
      Bus Speed:
    800 MHz

    Most of the time a perception of general slow performance is the result of installing third party junk alleged to speed up, "clean" or "optimize" your Mac, or to look for viruses that don't exist. Ideally you would know what you installed so you can uninstall it, but if you don't know or aren't sure there are techniques such as Safe Mode and creating a temporary user account to confirm that suspicion.
    If you open Activity Monitor it may show a process, or processes, that occupy a lot of your system's time.
    Slowness confined solely to web browser activity is often the result of an inexorable progress toward websites that demand ever more processor-intensive tasks. If your slow performance is strictly limited to web browsing, you might try disabling Flash by either uninstalling it, or use utilities such as ClickToFlash that allow you to control what Flash content gets loaded. Flash in itself is not inherently evil, but there is nothing to stop websites or the advertisers who pay for them from writing horrible Flash code that can do everything from hogging 100% of your CPU's time to causing random crashes. You can watch Activity Monitor as in the above to correlate these troublesome web pages with performance degradation.
    You are correct; if your computer shipped with Tiger you may certainly revert to it. I forgot that Tiger was shipping on new Macs as recently as five years ago. To downgrade it would be necessary to completely erase your hard disk and boot with the Tiger installation DVD, followed by installing it anew. Such drastic measures are not necessary and you are unlikely to be satisfied with the results anyway.
    Assuming your system is free of third party parasitic junk attached to OS X in an ill-conceived attempt to improve upon it, that your hard disk drive is sound and the boot volume has enough free space to work with, by far the best performance-enhancing improvement would be to add more memory. Buy as much as your computer can use and that you can afford. 2 GB is not that much any more.
    Read the following for some recommended troubleshooting techniques from Apple:
    General purpose Mac troubleshooting guide: Isolating issues in Mac OS X
    Creating a temporary user to isolate user-specific problems: Isolating an issue by using another user account
    Memory limitations: Using Activity Monitor to read System Memory and determine how much RAM is being used
    Identifying resource hogs and other tips: Runaway applications can shorten battery runtime
    Starting the computer in "safe mode": Mac OS X: What is Safe Boot, Safe Mode?

  • Hello, I have a question regarding the sharing/exporting on imovie. Whenever I click the share button all the normal options pop up, but when I actually click where I want to share it to nothing happens.  If you know what's wrong please let me know.

    Hello,  I have a question regarding the sharing on iMovie.  I have just recently purchased an Elgato Gaming Capture HD and I then finished my recording with that and put it into imovie.  I worked long and hard on the project and when I go click the share feature on iMovie all the noral options pop up and when I actually click where I want to share it to nothing at all happens.  If you know what is wrong/ what I am doing wrong please let me know.
    Thank you.
    PS:  I am using iMovie 10.0.6.

    /*line 957 error */
         public void select()
              for (count = 0; count <= p; count ++ )
                   if(P[count] != null){ /* validation */
                   m = (int)(P[count].getX());
                   n = (int)(P[count].getY());
                   if (Math.pow(-1, m + n) == 1)
                        piece[m][n].setBackground(wselect);
                   else
                        piece[m][n].setBackground(bselect);
              step = 2;
         }

  • Need to add new column in SAP Query - Please guide me in this regard

    Dear All,
    In SAP Query, I need to put a new coulmn of each record for the difference of Billing date and PGI date as a work days.
    eg: Billing Date = 02.05.2008
         PGI Date = 08.05.2008
    Take a Variable i.e. Days = Billing Date - PGI Date that will display as 5 days by excluding Saturday and Sunday.
    After doing calculation of these work days for each record, we need a to add a new coulmn in that record as field lable as "Work Days" and display.
    Please Guide me in this regard
    Regards,
    Sateesh.

    Hi Rama,
    In SQ01 when you are in the fields (first would be attributes, when you click next it takes you to field groups, and again when you click next if takes you to fields tab) check the following menu path
    EDIT -> LOCAL FIELD -> CREATE
    You can define the formula as per your requirement and populate the field.
    Hope this is helpful.
    Thanks,
    Pavan

  • Hi Sir! I have some questions regarding word report generation please.1.How can i add border to a word page?.2.How can i add grid lines to a table generated in word report?.3.How can i add border to a table of word report?.Thanks Imran Pakistan

    Hi !
    Sir I have some questions regarding word report generation using(C language in labwindows) Please.
    1.How can i add border to a word page?.
    2.How can i add border and grid lines to a table generated in word report(Not the " cvi table control" inserted from gui,i am asking about the table generated in word report)?
    3.How can i fill a cell of word report table withe the data type other than "character"?.
    And sir one question about use of timer in cvi labwindows please.
    Sir i'm trying to set minimum delay interval of timer control to 1millisecond(0.001s),as i set ,timer don't cares of the interval that is set by me it responds only to the default minimum time interval which is i think 10milliseconds(i'am using windows xp service pack3 version 2002).
    Regards
    Imran
    Pakistan
    Solved!
    Go to Solution.

    Hello sir!
    Sir i'm using daq6251.But Sir before implimenting it to my final application now i'm just trying to achieve 1millisecond time interval for timer in a vary simple programe i mean at this time no hardware (daq device) is  involved i,m just trying to achieve minimum time interval of 1millisecond.
    Sir i read form "help" of labwindows how this time interval can be set,i'm trying for,as described in help notes but i could'nt.I'm attaching a screen shot sir for you it may helpful for you to explain me.
    And sir also waiting for your kind reply regarding word report generation.
    Thanks.
    Imran.
    Attachments:
    screen_shot_rigistry.docx ‏65 KB

  • I have just got my iPad2 and very pleased with it. I have a question regarding the monthly (recommended) battery full charge.  Should I let the battery completely die down to nothing at all or would this be bad for my iPad?

    I have just got my iPad2 and am very pleased with it. I have a question regarding the monthly (recommended) battery full charge.  Should I let the battery completely die down to nothing at all before I plug in to recharge or would this complete drain be bad for my iPad?

    It's not bad for it - on this page www.apple.com/batteries/ipad.html it says :
    For proper reporting of the battery’s state of charge, be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).

  • Jlist Question. Please guide

    Chaps
    I HAVE A QUESTION Regarding JList
    1 have a Jlist composing of 8 elements
    So,
    This is displayed as :
    1 [ListenerFocus is here]
    2
    3
    4
    5
    6
    7
    8
    Now,I want this list to be displayed as
    [Gap in the layout]
    1 [Listener Focus is here]
    2
    3
    4
    5
    Is this possible? Can I have a gap in this layout?

    how about putting empty elements first and then actual data???

  • Link is not working for one role. how to check please guide.

    Hi Expert,
    I have a simple question but as don;t aware of some of the techincal area not able to understand where to check.
    I have a link under document flow in offer( opportunity) where for one role sales support user the link is not happening. I have checked for other role its working fine.I understand that for this role the link  will not work as per the role maintianed.
    But where this link got maintained and how i will be able to check which link is tagged to which profile.
    rolewise mappeing with link.
    Please guide.
    Prem.

    Hello Prem,
    Please check the navigation bar profile from your business role.
    Then go to the navigation bar profile settings, you can find the details settings there.
    If it is a link under some work center, you need to start from the work center.
    If it is a direct link, then start from the derect link group.
    Hope this could be helpful.
    Best regards,
    'Maggie

  • Experts please guide me in Sap Abap Hr and in Sap Hr. I have 1 year exp but didn't get job wht to do  ?

    Dear SAP Experts ,
    I Have 1 year exp as an Associate SAP ABAP HR Consultant and i have done MCA but still didn't get any job i am free from 3 months didn't get any call please guide me what to do my abap is not much strong but hr is good . i am so upset tht planing to move in other job profile like SEO or work as HR executive for getting domain knowledge.so plz guide me wht to do and please also tell in ABAP HR which main topics i have to make strong ?
    Thanks
    Regards,
    Vikrant
    <<Moderator Message: How many times are you going to ask the same question?>>
    Message was edited by: kishan P

    Hi Vikrant,
    Since you are more interested towards HR than ABAP, in long term you can think of moving into SAP HCM functional career. And to be able to work as a functional consultant, you need to have good amount of business process knowledge. Considering this you can start working in core HR and gain domain experience and move your career later towards functional area.
    And more over you have ABAP HR experience,this will be very handy when you are a functional consultant.
    Regards,
    Ravi

  • Problem in BW System in Portal..Its urgent.. Please guide

    Hello All,
    Scenario:
    Working in a load balancing landscape
    Requirement:
    Need to create a BW Report iView (which isnt working)
    Problem / Questions:
    1. Created a BW System in portal but since its load balancing, please confirm if this is all right:
    - Using Logon Tickets Name
    - Group = ?group?
    - Message Server = ?server?:?port?
    - SID = ?r3name?
    - Server Port = blank
    - SAP Client = blank
    - System Type = SAP_BW
    - WAS Host = ?server?:?port?
    - WAS Protocol = http
    - User Mapping Type = admin
    2. Tested the connection and the WAS & Connector Tests fail.
    3. When I preview the SAP BW Report iView, get a prompt error saying
    " session management will not work!
    Please check the DSM log file for details.
    you can turnoff this alert ..... "
    Now, Ive seen many posts which show how can I disable this prompt message but it would not solve the problem. On clicking on "ok" from the above mentioned prompt, I get an error saying "Page cannot be displayed"..
    Please guide.....
    Its kinda urgent....
    Awaiting Reply.
    Thanks and Warm Regards,
    Ritu

    Hi,
    Do the following:
    <b>1. Property Category : Connector</b>
    <b>Group</b> -> You can check this from the SAP Logon Pad. Click on groups and then click on generate list.
    <b>Logical System Name</b> -> <SID>CLNT<Client Number>
    <b>Message Server</b> -> You can also find the message server from the SAP Logon Pad or ask the BASIS team. On SAP Logon Pad, click on groups -> You can see the servers in the group.
    <b>Remote Host Type</b> -> 3
    <b>SAP Client</b> -> You can get this from SAP Logon Pad or contact the BASIS team. A system can have many clients to be particular.
    <b>SID</b> -> System ID of your BW system. This would also be available from SAP Logon Pad or contact the BASIS team for information
    <b>Server Port</b> = The server port would be 80<System Number> i.e. 8000 if the system number is 00 and 8001 if system number is 01
    <b>System Type</b> -> SAP_BW
    <b>2. Property Category : ITS</b>
    <b>ITS Host Name</b> -> If it's WAS6.40 and above, it would be an integrated ITS which means the ITS hostname is same as your BW System Host Name. i.e. xxxx.abc.com:80<system number>
    <b>ITS path</b> -> /sap/bc/gui/sap/its/webgui/
    <b>ITS Protocol</b> -> http
    <b>3. Property Category : User Management</b>
    <b>Logon Method</b> -> SAPLOGONTICKET
    <b>User Mapping Type</b> -> admin, user
    <b>4. Property Category : WAS</b>
    <b>WAS Host</b> = Fully Qualified Domain Name of BW System : 80<system number>
    <b>WAS Protocol</b> = http
    Check the connection then.
    Cheers,
    Sunil

  • New to SAP Netweaver...Please guide....

    Hi all
    I have recently joined this network.
    So, not sure wether this is right place to post such a question.
    I am a fresher in IT field. My level of knowledge is limited to core java and JSP, servlets.
    Now I am a member of project team which is working on SAP Netweaver. By now, I have just been able to understand that this has to do something with java. To be more specific I have to work on SAP netweaver Developer studio.....
    I wish to pave a good foundation basic knowledge on this entire technology.
    I just seek guidance on how to approach for this field.
    I am having very basic knowledge about SAP that it is an ERP and have various integrated functional modules. But nothin more than that.
    So, do i need to learn SAP before moving towards Netweaver. If so, then to what extent should I learn SAP and how.
    I came to know about a book SAP Netweaver for dummies. As its name suggest , i thought it would be better option to start. But not sure.
    Please guide me.
    Thanx.

    Hi Saurabh,
    SAP NetWeaver provides an open integration and application platform and permits the integration of the Enterprise Services Architecture. You can unify business processes across technological boundaries, integrate applications for your employees as needed, and access and edit simple information easily and in a structured manner.
    It has many features and components. go thru the following link it would be helpful.
    http://help.sap.com/saphelp_nw04/helpdata/en/start.htm
    It helps you to decide the area which you want to choose.
    hope this helps
    reward points if helpful.
    regards,
    mrudula

  • Please Guide

    Hi,
    In J2SE, while using SSL, we create key-stores and trust-stores using keytool. Now, if I want to use HTTPS to transfer a msg to a Server that is implemented in C, how do I go about... Here I have my client implemented in Java? Will trust-store exist for Server implemented in C? Do trust-store and key-store exist in all platforms or they are Java-specific? If they exist, will keytool still be useful in exporting the trust-store to the destination? If they exist, is there some specific location they are located in?
    I know that my questions might be dumb, but I have just started with socket-programming. Please guide if you have any suggestions.
    Thanks a lot.
    Regards,
    Jay

    Hi,
    In J2SE, while using SSL, we create key-stores and trust-stores using keytool. Now, if I want to use HTTPS to transfer a msg to a Server that is implemented in C, how do I go about... Here I have my client implemented in Java? Will trust-store exist for Server implemented in C? Do trust-store and key-store exist in all platforms or they are Java-specific? If they exist, will keytool still be useful in exporting the trust-store to the destination? If they exist, is there some specific location they are located in?
    I know that my questions might be dumb, but I have just started with socket-programming. Please guide if you have any suggestions.
    Thanks a lot.
    Regards,
    Jay

  • Query on File System Repository..Please guide

    Hello All,
    I have successfully created the <b>File System Repository</b>, connecting a folder on my windows 2000 machine to an EP (Netweaver 2004s) KM, following the steps like:
    1. Creation of <i>Windows System</i>
    2. <i>Network Path</i> since the server and my machine are seperate systems
    3. Creation of the <i>File System Repository</i>.
    You may refer to the above steps in detail using <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/92322ab24e11d5993800508b6b8b11/frameset.htm">link</a>
    <u>Question</u>:
    1. After the successful creation, I deleted the Windows system created, but the File System Repository was still working all fine. Why so? Shouldn't this throw me an exception?
    2. While creation of the Windows System, I entered the ID and Desription.
    In the Network Paths, I entered the folder's name (folder which is on my machine/which is to mapped) & my machine's username + password.
    Then how does the system/server know which windows system is to be mapped for the netwrok path?
    In other words, what is the mapping betweeen the Network path & Windows system?
    3. If you access the above link, there is a step of creating a System in the Portal System Landscape. What is the need to do this? Can you please explain......
    Why create a PCD System object, System Alias, etc....
    Would appreciate if you please help me understand this concept.....
    Awaiting REply.
    Thanks & Warm Regards,
    Ritu

    Hello All,
    Please guide me.
    Awaiting Reply.
    Thanks & Warm Regards,
    Ritu

Maybe you are looking for

  • Stop error in phase START_SHDI_FIRST

    hi, we are upgrading from 4.6c to ecc6.in the phase START_SHDI_FIRST shadow instance is not starting. below is the dev_trc trc file: "dev_disp.new", trc level: 1, release: "700" sysno      04 sid        DEV systemid   324 (IBM iSeries with OS400) rel

  • Why do the Apple default apps have so many issues?

    With my upgrade from my trusty but dying iPhone 4s to a shiny new iPhone 6, the additional screen real estate makes me want to do a whole lot more. Things that I would previously never have dreamed of doing now approach the realm of the possible. Wit

  • Adobe CS 5.5 Installation on 10.6.8 - ERROR

    Hi everybody, want to install CS 5.5 on an iMac running 10.6.8. On the iMac the CS 5 is running without any errors. Have mounted the CS 5.5 Image on the Client, and when opening the "Installer.app" it comes up with an error: "Failed to initialize" an

  • Photoshop 3d obj interacting strangely with other layers

    After Effects and Photoshop CS5. I have an imported photoshop 3d object which on its own behaves as it should. But, when I place it in front of other layers (2d in 3d space) I can see the other layers through the photoshop 3d layer. They are all beha

  • Problem with listRecordStores() on Palm

    Method listRecordStores() always returns null, even at presence of bases