How to access a Stack class from different classes

Hi
I have a Stack implemented as Stack.java. I have 2 more java files Control.java and display.java.
In Control.java
I have created Stack stack = new Stack(); and am pushing values in the stack.
In display.java i have some conditions where i want to push some values in the same stack as that on the Control.java.
How do i acces the stack in Control.java from other files like display.java

In display.java i have some conditions where i want
to push some values in the same stack as that on the
Control.java.
How do i acces the stack in Control.java from other
files like display.javaPass that object reference to some method. :-)

Similar Messages

  • OOABAP-How to access the protected methos from a class

    How to access the protected methos from a class..There is a built in class..For tht class i have created a object..
    Built in class name : CL_GUI_TEXTEDIT
    method : LIMIT_TEXT.
    How to access this..help me with code

    hi,
    If inheritance is used properly, it provides a significantly better structure, as common components only
    need to be stored once centrally (in the superclass) and are then automatically available to subclasses.
    Subclasses also profit immediately from changes (although the changes can also render them invalid!).
    Inheritance provides very strong links between the superclass and the subclass. The subclass must
    possess detailed knowledge of the implementation of the superclass, particularly for redefinition, but also in
    order to use inherited components.
    Even if, technically, the superclass does not know its subclasses, the
    subclass often makes additional requirements of the superclass, for example, because a subclass needs
    certain protected components or because implementation details in the superclass need to be changed in
    the subclass in order to redefine methods.
    The basic reason is that the developer of a (super)class cannot
    normally predict all the requirements that subclasses will later need to make of the superclass.
    Inheritance provides an extension of the visibility concept: there are protected components. The visibility of
    these components lies between that of the public components (visible to all users, all subclasses, and the class itself), and private (visible only to the class itself). Protected components are visible to and can be used by all subclasses and the class itself.
    Subclasses cannot access the private components  particularly attributes) of the superclass. Private
    components are genuinely private. This is particularly important if a (super)class needs to make local
    enhancements to handle errors: it can use private components to do this without knowing or invalidating
    subclasses.
    Create your class inse24 and inherit this CL_GUI_TEXTEDIT
    class in yours. You can then access the protected methods.
    Hope this is helpful, <REMOVED BY MODERATOR>
    Edited by: Runal Singh on Feb 8, 2008 1:08 PM
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 2:19 PM

  • How to access a web service from a XLet

    Hello,
    I am new in software development to ITV and I dint find too many usefull information teaching how to access a web service from a XLet running in a STB. Are there anybody who can give me some help, maybe sample or tutorial?
    Gratefull
    David

    hi,
    you can "borrow" the source code from [Yambo a free soft open source presentation engine (AKA XML microbrowser Xlet )|http://www.cineca.tv/labs/mhplab/index-en.html] both local and on a http remote connection.
    hope it helps..
    bye
    andrea

  • How to access my macbook pro from a windows pc?

    how to access my macbook pro from a windows pc?

    Depending on what you mean by "access" the following may help:
    File sharing: How to connect with File Sharing on your Mac - Apple Support
    One way (and there are others) for remote control and remote access between Mac and Windows: http://www.teamviewer.com/en/index.aspx

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to merge two search button from different criteria

    How to merge two search button from different criteria
    this image show the question
    http://s24.postimg.org/4algthuj9/1111.jpg
    two different criteria for the same view and I need to merge it in one button as when I click
    on the button search result give from two criteria parameters

    You can!t using af:query. the af:query component comes as is. If you can't do it through the properties, you probably can't do it at all.
    As in your other thread, the way to go is to program your own search form. This way you can use a layout and functionality you like.
    For this you create a form with input fields for the values you are searching for, put them on hte page in a way you like and in the end by hitting on a button (e.g. called Search) map all inputfields to parameters of a service method you defined in your application module or VO. This service method then executes a view criteria returning all matches in the default iterator (just as if you had used af:query.
    Timo 

  • Don't know how to access my email away from home

    i don't know how to access my email away from home.
    can't find webmail or email options.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.1; AOLBuild 4334.5009; Windows NT 6.0; Trident/4.0; GTB6.3; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

    Somehow I got it to work, a whole lot easier than i thought, kind of scary how easy... but Im not exactly sure what of several things is how I got it. Scariest thing; watching my iBook I wouldn't know that I was accessing it from the MB. It's only me doing it, but still seems so easy.
    If I have a WPA2 password protected wireless network do I have to worry that others can access it so easily? (not that I have anything interesting, it's just the general privacy paranoia)

  • How to access the abap program from MS Excel?

    Hi ,
    How to access the abap program from MS Excel or MS access ?
    The abap program "z..."  has the below input and output attributes
    Input : Date,Index and file name with location (.htm or .xls)
    Output : htm or xls file downloaded at the above location.
    Please help me here.Do we haev to use BAPI and RFC?If yes,please tell me how to use them
    Regards
    Dinesh

    Maybe this could help you up -;)
    [Simple SE38 Emulator using Microsoft Excel|Simple SE38 Emulator using Microsoft Excel]
    Greetings,
    Blag.

  • How do I remove stacked photos from my desktop

    How do I remove stacked photos from my MacBook Pro desktop?

    Hi there JudyComeaux,
    If you are would like to re-arrange your the items on your desktop so they aren't stacked on top of each other, take a look at the information below.
    Mac 101: The menu bar
    http://support.apple.com/kb/HT2473
    Cleaning your desktop
    To help get you familiar with how menus and menu commands work, here's how to clean up your desktop using Finder menu commands.
    To tidy up your files and folders so that they all line up in nice, neat rows, click on the desktop to make the Finder active.
    From the View menu, choose Clean Up.
    If you want to organize files and folders by name, kind, or other criteria do this: From the View menu, choose Arrange By, then choose Name or Kind or another choice in the submenu.
    If you need to remove those files, take a look at the article below.
    OS X Mavericks: Remove files and folders from your Mac
    http://support.apple.com/kb/PH13765
    -Griff W.

  • How to access *.MDF(Databaee file) from JDBC

    Hi Everybody,
    any one know How to access *.MDF(Databaee file) from JDBC ?
    Thanks in advance.
    HHHHHHHHH

    Get the Microsoft SQL Server JDBC driver and follow the directions in its documentation.

  • How to access a Java class from view controller?

    Hi All,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    When I try to access the Test class from view controller,
    I getting this error "Test cannot be resolved or is not a type".
    How do I fix this?
    Thanks
    Sundar

    Hi,
    I have created a Test.java class file from Navigator view under
    Src --> Packages --> com.sap.MyProject.
    After this you can goto the context of your View and define the VA goto the type of VA and click on the right side button and go to java native type and type your java file name click you name .
    that means the jave file s assigned to VA.
    U can utilize thrut that VA.
    Thanks,
    Lohi.

  • How to access AM/VO instance from a Java Service class

    Hi,
    I have a Java service class that is loaded by Java ServiceLoader (http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) at run time, and I need to access database tables inside that service class. So is there any way that I can access AM/VO instances from that Java class in order to read database table? Thanks.
    Regards,
    K Hein

    You can access an application module with the the two methods below:
        YOURAppModule mAM;
        public void setUpAM()
            throws NamingException
            try
                String AMDefName = "YOUR_APP_DEF_NAME";
                Hashtable env = new Hashtable(2);
                env.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
                env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
                ApplicationModule am = null;
                InitialContext ic = new InitialContext(env);
                ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(AMDefName);
                am = home.create();
                // Connect the AM to a database connection
                String jndiDB = "jdbc/HRDS";
                am.getTransaction().connectToDataSource(null, jndiDB, false);
                boolean connected = am.getTransaction().isConnected();
                mAM = (YOURAppModule) am;
            catch (NamingException nex)
                // do some error processing
                throw nex;
            catch (Exception eee)
                // do some error processing
                throw eee;
        public void tearDownAM()
            if (mAM != null)
                if (mAM .getTransaction().isConnected())
                    mAM .getTransaction().disconnect();
                    mAM .remove();
        }You find the YOUR_APP_DEF_NAME in your application module under 'Configurations' -> AppModuleJndiName.
    Make sure you tear down each AM you set up. Otherwise you are running out of resources pretty fast.
    Timo

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • Accessing a static varible from different object at the same time

    hi
    assume that i have calss it contains a static variable i am creating
    N numbere object of that class and i am try to access the static variable at the same time from different object.if i access like that any problem(deadlock) will occure or not? plz help me
    with regards
    suresh

    FeedFeeds : Read news and blogs a new way!
    http://www.feedfeeds.com
    Please don�t spread any kind of propaganda in this forum...;-)

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

Maybe you are looking for

  • Cannot back up to time machine after restore

    I've been using Time Machine successfully on my 2009 27" iMac 3.06 ghx Core2Duo (Mountain Lion 10.8.2). Recently I started having drive issues, so as usual, I ran Disk warrior 4.4 and it came up with some errors that could not be fixed and it suggest

  • Creating attachment in Webdynpro for ABAP

    Hi Expertrs,                   I am new to webdynpro for ABAP. I have a requirement like I need to create an attachment in webdynpro screen. I have searched the forums and I got the class CL_GOS_SRV_ATTACHMENT_CREATE and method EXECUTE_ITS. but when

  • Unknown user type: oracle.jbo.domain.Date exception from time to time. How to solve?

    Hi, This is the first time I am using Coherence to cache some lists in my ADF Application. This is my objects configuration file: <?xml version="1.0"?> <!DOCTYPE pof-config SYSTEM "pof-config.dtd"> <pof-config>     <user-type-list>         <!-- coher

  • It takes long time to load the parameter's value when running we run report

    Hi, It takes long time to load the parameter's value when running we run report. What could cause this? How to troubleshoot the behavior of the report? Could I use Profile and what events should i select? Thanks

  • Structure won't let me add characteristics

    Hi, I have 2 structures in a query but now when I try to add some particular restricted key figures it refuses to accept them? What could be the problem? Thanks