Doubt: Interface

One basic question, Please clarify.
What is the contract of interface in java ?

JK2004 wrote:
One basic question, Please clarify.
What is the contract of interface in java ?Ummm the interface is the contract.
If you need more clarification you need to expand on your question. Perhaps some code.
You should also read this before continuing http://java.sun.com/docs/books/tutorial/java/IandI/index.html

Similar Messages

  • Use Of Interface(Memory Consume)

    I have a doubt
    //Interface A
    code:
    interface A{
    public void add();
    public void sub();
    public void multiplication();
    //Class B that Implements A
    class B implements A{
    public void add(){
    int a=30;
    int b=40;
    int c=a+b;
    System.out.println("The result of Addition is:-"c);
    public void sub(){
    int a=80;
    int b=40;
    int c=a-b;
    System.out.println("The result of Substraction is:-"c);
    public void multiplication(){
    int a=80;
    int b=40;
    int c=a*b;
    System.out.println("The result of Multiplication is:-"c);
    public void division(){
    int a=80;
    int b=40;
    int c=a/b;
    System.out.println("The result of Division is:-"c);
    //Anaother class C that use B's method
    class C{
    public static void main(String[]args){
    //what is the differnce
    //I have a doubt why we use this line
    A a=new B();
    a.add();
    B b=new B();
    b.add();
    I have a doubt,In class C I am accessing the B's add()through 2 referance variables one is class type and another is interface type.ok
    My doubt is what's the differance?
    which is adviceable to use?
    if Interface reference is advisable,weather it will allocate memory at runtime or compile time?
    a class variable will allocate memory at runtime or compile time?
    thanks
    Biswo
    Edited by: Biswo on Dec 3, 2008 8:29 AM

    Biswo wrote:
    My doubt is what's the differance?
    which is adviceable to use?They're equivalent from a performance standpoint so it boils down to whether you want the reference variable to be of type A or B, which is a design consideration.
    In both cases the B object is allocated at runtime and the add method is bound at runtime.
    The Java language is very efficiently implemented so you don't have to worry about things like this. Concentrate on proper design instead.

  • Clarification on order to cash cycle

    Hi Experts,
    I'm working in EBS 11.5.10. In order to cash cycle, where exactly APIs 'OE_INVOICE_WF' and 'OE_INVOICE_PUB' will be called...and what exactly these APIs will do. Could somebody explain to me in detail functional flow of o2c cycle especially after booking the order. Kindly help me at earliest.
    Doubt: Interface trip stop program will use these two APIs internally...
    Thanks in advance.
    Regards,
    Raghu.

    No ITS does not all it internally.
    In a typical O2C flow, after the ITS, fulfillment activity happens which is the logical completion of shipping and delivery activities for a SO line. Then the workflow sits at invoice interface activity. oe_invoice_wf is the api that the workflow calls and inside that oe_invoice_pub is called. This is the api that has the invoice interface logic.
    -Abhishek

  • INTERFACE DETERMINATION AND RECEIVER DETERMINATION DOUBTS???

    Hi Team
    I am having doubts regarding the Interafce Determination and the receiver determination. In pur landscape in our objects, some times i am seeing a Condition is being defined in the Interafce Determination  and sometimes  am seeing a Condition is being defined in the receiver determination . could you please let me know the differences between the above two.
    thanx in advance.

    Hi Nabhinav,
    Condtions in receiver determination - These conditions are evaluated and executed to determine the receivers for this incoming message.
    Condtions in Interface determination - These conditions are evaluated and ececuted to determine the Interface mapping to be called in order to map the source message to the target message.
    Please take a loot at these links for more details:
    http://help.sap.com/saphelp_srm50/helpdata/en/26/5ccd3bb4560f01e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce2a8e3a8e5430e10000000a42189b/content.htm
    Also, search the SDN before posting you query.
    Regards, Gaurav.

  • Interface doubts

    hi all,
      i have 2 doubts in interfaces in OO ABAP
    1. do all the methods in interface are by default abstract
    2. do all the methods have to be compulsorily implemented
    Regards,
    N Manjrekar

    Hi,
    No all methods in interface are not default abstract.
    i think all the methods of interfaces have to be implemented in the class.oterwise u will get error implementation missing for method.
    Regards,
    Sruthi

  • Clear my  doubt on Interface

    Hi,
    When a class implement an interface,the method of the class should thorugh the same exception or any of its subclass exception or any different exception,as that of the exception declared on the abstarct method of the interface.
    Please any one solve my doubt as early as possible.
    Thanks
    Vish

    Hi,
    When a class implement an interface,the method of
    the class should thorugh the same exception or any of
    its subclass exception or any different exception,as
    that of the exception declared on the abstarct method
    of the interface.
    Is this supposed to be multiple choice?
    The easiest way for you to answer this question is to try it out yourself in code.

  • I have doubts in interface

    Hi all,
    I have doubts in interface . You please help me.
    My question was
    i have two interface. and also i have only one method in both interfaces.these method are same name in both interface
    Now i implement these interfaces in my class it's work properly. it doesn't through exceptions.
    But i have changed the return type of methods,
    ie i put int for one
    and void for another one.
    it throws exceptions . duplicate method access.
    how to i solve this problem? did u catch my point?
    please help me Advance in thanks.

    i have two interface. and also i have only one
    y one method in both interfaces.these method are same
    name in both interface
    Now i implement these interfaces in my class it's
    work properly. it doesn't through exceptions.
    But i have changed the return type of methods,
    ie i put int for one
    and void for another one.
    it throws exceptions . duplicate method access.
    how to i solve this problem? did u catch my point?Yes I caught it. The solution: don't do it. Methods differ by name and argument type list. Return values are not looked at.
    Another solution: have the methods take different arguments. Or rename one of them.

  • Trackball (Mechanical Interface) doubts

    Hi all! (and excuse my english)
    I have some doubts with trackball sphere mechanism as future interface for my Shockwave 3d "planet earth". In future, my client will plug a "trackball sphere" physical interface to use instead mouse. This will only be an sphere, and no click button will available there (no drag, only move), in short words "the trackball sphere is the planet in the hands of user". My question is about cursor: always my planet must be moved by trackball (using cursor moves detection, i supose), but ,what about mouse coordinates? If user moves and moves a lot the trackball mechanism, my system will continue working fine, even when cursor be thousands of pixels out of stage?. I must relocate cursor to stage everymoment?.
    Il be glad to ear some related experiences about "trackballs"
    Tks in advance.!

    Hi.
    I get my answer on friendly forum.
    If some of you found this thread because same problem, go and read:
    http://www.directorforum.com/showthread.php?t=2176&highlight=cursor+out+stage

  • Supplier Interface Doubts

    Hi All,
    I have some doubts regarding Supplier Interface.
    We need to import Suppliers, Sites, Contacts and Banks. So do we need one program to create all in one, or we need separate programs for each?

    Hi,
    The supplier import jobs are designed so that you can support suppliers, sites, and contacts as individual or single requests, or there is a request set that will run all of them, the Supplier Open Interface Request Set.
    There is not a concurrent request, either a single or request set, that allows you to run the bank import API. That has to be launched manually.
    Regards,
    Cheryl

  • Receiving Open Interface related doubt

    Hi All,
    We are currently on Oracle Release 12.0.4 and need some help/information regards Receiving Open Interface tables : rcv_headers_interface & rcv_transactions_interface tables.
    We import the ASN which is being sent across from the Supplier via EDI directly into the Receiving Open Interface tables and then RTP program ( Receiving Transaction Processor ) program processes these into the base tables
    to complete the receipt process..
    Now for some reason or the other lets say because of EDI data issues or some other system issue with the RTP program , the Interface records end up in error status & the users have to manually complete the Receipt in Oracle Forms directly..
    Now this Interface data over a period in time keeps accumulating while the corresponding PO Document would already have been Received manually in Oracle.
    Because of this errored interface records the Interface tables keep growing in size in terms of data volume..
    Now is there a way script or a program which validates these interface records and purges these automatically based on some validations on its own..
    For Example : for a po if the records are stuck in the interface table but the po shipment has already been received in manually and in Closed Status, then it would automatically purge these records from interface tables.
    Could someone please help us with this as soon as possible with any suggestions or workarounds..
    Thanks

    Currently there is no purge program available to purge the records in RTI. Further the oracle support wont be able to provide a delete script to delete the records in RTI (The reason being, the records are populated by the customer and customers are the best persons to validate the records and delete them on their own).
    However, for ASN's
    You may write a query based on the RTI.po_distribution_id and then check, whether the corresponding po shipment\distribution is already received \ closed for receiving and then you may delete.

  • PI 7.1 multiple operation interface and SOAP action doubt

    Hi guys,
    I'm trying to implement a scenario, where I have a single outbound (sender side) interface with multiple operations (as 7.1 allows). The problem is afetr the WSDL generation I have the same SOAP action for each operation. Standardly there should be unique SOAP action per operation, but how to achieve it?
    And another question - is it ok to use SOAP sender adapter for this interface?
    Thanks for your help,
    Olian

    Hi Olian,
    >>The problem is afetr the WSDL generation I have the same SOAP action for each operation. Standardly there should be unique SOAP action per operation, but how to achieve it?
    I dont think you need to have separate action, the Operation Name inside Service Interface differentiate the Request type. Also when you send SOAP message to PI, you are sending it to either
    http://host:port /XISOAPAdapter/MessageServlet?channel=p:s:c
               (where host is the host name, port is the port number, p is the optional party name, s the service name, and c is the channel name, respectively.The URL given above is valid for 3.0/7.0/7.1.)
    or      * http://host:port /XISOAPAdapter/MessageServlet?senderParty=FP& senderService=FS& interface=IF&receiverParty=TP&receiverService=TS&interfaceNamespace=IFNamespace *   
    (7. 10 onwards a new URL syntax is also valid and is recommended to be used. )
    >>And another question - is it ok to use SOAP sender adapter for this interface?
    Yes
    Regards
    Suraj
    Edited by: S.R.Suraj on Sep 8, 2009 6:23 AM

  • Interface Determination doubt

    Hi guys,
    I have a file with the following example source:
    80
    80
    56
    25
    32
    80
    56
    … The target is an R/3 and the interface is IDoc. All lines with value “80” should map to RPLMAS02 and the others values to ARTMAS 05. So, is two different mappings based on content field for the same target service “R/3”.
    I already have two different mappings for each IDoc type, and I’m using the function “createIf” to exclude the lines that I don’t want to add in each IDoc. But, I can’t do it using XPath conditions in the Interface Determination, because both mappings are always performed…
    Which is the best way to achieve this issue?
    Thanks in advance,
    Ricardo.

    Hi folks,
    Thanks a lot for your prompt answers.
    Aamir: Take my source code as an example, I have several lines with different key field values. Based on these key field values I want to route both contents to different mappings. The lines with 80 value to RPLMAS mapping and the rest (different from 80) to ARTMAS mapping. But, from my understanding, at Interface Determination level, one message is considered and the XPath conditions only checks where 80 value exists or not. As I've a message with both values 80 and !=80), both mappings are performed and the last one is generated empty with error.
    Saravana: I didn't understood where this "workaround" solve my issue above?
    Resuming: I want to route lines for two different mappings and not an entire message. I mean, I want to put lines 80 in one mapping and the rest in another every thing at the same execution time.
    Thanks in advance,
    Ricardo.

  • Messages interfaces doubt in Webservices and BPM design

    i have a requirement where SAP sends data to some web application.. so we are going to use Proxy to webservices.. in this we are also using BPM.
    SAP sends the data to PI ..in PI BPM triggers it will check some login credintials with webserices application and response will be sent back to PI .. in PI it will have to append the login session id with SAP data and then finally PI pushes the data to target system(web application).
    SAP--SAP-PI (BPM)web services.
      1. SAP sends data to PI
      2. PI checks the login credentials with webservices
      3.Sen back the session id
      4. session id appended to SAP data
      5. Final data will be sent to webapplications
    So how many msg interfaces that i need to create.?
      1 DATAfrom SAP_Outbound (Asyn) ---
      2. Data from SAP_Abstarct(Asyn)_BPM
      3. Data webapplication to SAP- (abstarct )-Sync   ( which gets the session id)
      3. FinalDatato Webapplication(Asyn)-Abstract
    Please correct me if i'm wrong...
    Regads,
    Deeps

    Hi Shabarish,
      Proxy call is Async
    Prateek,
       can we make it with SOAP lookup? which one is best the option BPM or SOAP lookup..
       i hope it is always good to have a interface without BPM right ?
      Can you tell me how to approach SOAP lookup.. ?
    Regards,
    Deep

  • Configure Network (Ethernet Cards) interfaces doubts.

    Hi All,
    I m beginner in Solaris/Unix, and I have same problems in configure my network.
    I have one machine with 2 Ethernet Cards, this machine has multiboot, than it have Solaris 10 and Windows XP.
    I will show the configuration that I have on Window,I need the same configuration in Solaris:
    In eth0:
    IP: 192.168.0.117 (In Solaris the name of this is in ifconfig is IP, OK?)
    Mask: 255.255.255.0 (In Solaris the name of this is in ifconfig is
    netmaks , OK?)
    Gatway: 192.168.0.254 (In Solaris the name of this is in ifconfig broadcast, OK?)
    Primary DNS: 192.168.0.254 (In Solaris I don�t know how configure this)
    Secondary DNS: void (In Solaris I don�t know how configure this)
    I Have an DHCP Server in 192.168.0.254, than I can use dhcp.
    The problems, When I try use DHCP:
    Ifconfg eth0 DHCP
    This command delay and return an Error.
    If Itry configure manually, like
    Ifconfg eth0 192.168.0.117 (this OK)
    Ifconfg eth0 netmask 255.255.255.0 (this OK)
    Ifconfg eth0 broadcast 192.168.0.254 (here the 254 is changed to 255 that is broadcast default, but in my net broad cast or router is in 254)
    Other thing how I save this configuration. When I restart I lost all changes�
    Well in second interface the problem is same, but I didn�t have DHCP:
    IP: 200.44.136.145 (In Solaris the name of this is in ifconfig is IP, OK?)
    Mask: 255.255.255.192 (In Solaris the name of this is in ifconfig is netmaks , OK?)
    Gatway: 200.44.136.129 (In Solaris the name of this is in ifconfig broadcast, OK?)
    Primary DNS: 4.2.2.2 (In Solaris I don�t know how configure this)
    Secondary DNS: void (In Solaris I don�t know how configure this)
    fconfg eth1 200.44.136.145 (here .44 is changed to 36)
    Any one can help-me please?
    Thanks

    yes. you got it .... eg..
    /etc/hostname.le0
    /etc/hostname.le1
    in here put the hostname ... so at the shell prompt:
    # hostname <cr>
    should give your hostname.
    now, in the hosts file: eg:
    # Internet host table
    127.0.0.1     localhost     
    <your ip address> <your hostname>     loghost
    129.156.89.252 host2
    you need to reboot after this.
    if you get a 'bad address' error on boot,
    you probably have a mismatch of hostnames/ip addresses somewhere in their respective files.
    also, see:
    # man hosts
    # man ifconfig

  • Interface parameters in Function Module -- Doubts

    Hi,
    We are developing a custom function group which will have 5-6 custom function module. When you create a function module and specify its Export/Import and table parameters, SAP mark them as "Local Interface".(You can look at the Function module source code's first line)
    But if you goto the Menu and click Edit>Interface>Globalize parameter and it will change from "Local Interface" to "Global Interface". So now you can use these interface parameters (Export/Emport or tables) without passing them explicitly in perform statement. So in other words they are easily available in the function module.
    My question are:
    1. Whats the difference between Local interface and Global interface and when should we use which. (SAP normaly use Local interface in all there function modules).
    2. If we use Global interface then is it possible that multiple instances (same fuction module called at same time with different or same data) will somehow mix the data from different calls and show unpredictable results.
    Will appreciate if someone can help me understand it from conceptual point of view.
    Thanks in advance.
    Jeet

    Hi Jeet,
    1). The difference between Local and GLobal are identified by the name itself. One makes the interface locally available and one makes it globally available. This means that, within the function group, you can access the function parameters in subroutines, as well as PBO and PAI modules.
    When to use depends, if your function module consists huge code and does massive processing in such cases its better to write subroutines and split the code into smaller sections for parallel processing. In Such cases its better to use Global interface so that you dont have to pass the interface each and every time.
    2). Yes it might affect the gloabl parameters as Unlike other global data, the contents of the global parameters of a function module are known only from the time of the call until you leave the module.
    Due to this limitations SAP has come up with OOPS concept where the data integrity is maintained.
    Cheers
    VJ

Maybe you are looking for

  • Ipod freeze up

    I have a JBL Radial ipod speaker. I live remote and occasionaly have power surges. The ipod freezes on whatever screen it is on and remains on til the battery is too low for operation. JBL says they haven't heard of the problem with their unit and it

  • Remote no go in hifi mode?

    Anyone got any tips on how to get the remote to work on hifi mode?

  • Firefox opens first window in ghost session

    Firefox was previously working. Now when Firefox is restarted a "ghost session" starts. By this I mean Firefox looks as though its loading, there is an icon on the start bar, and if I rest my mouse on it I see preview of the "live" tab (by right-clic

  • Root is running Sun One Directory Proxy Question ?

    While i was installing the directory proxy server, i gave all root to own the files? Is Sun One Directory Proxy suppose to run as root or can i run as non-root user ?

  • Cannot install Crystal Reports 8.5 Pro - no Registration code

    We want to re-install Crystal Reports Profession 8.5 because the old PC it was installed has been replaced. We have the CD and the keycode but cannot complete the process.The installation asks for the keycode and then all our details which we enter i