Linking the different classese together

I am writing a program the includes several classes, say A,B and C, with the main method in A. The problem is that I can create an instance of B and C and use their methods and access their variables. However, I am unable to access methods and variable of A from B or C. How should i do this??

By passing a reference of A to B:public class A{
private B b= null;
public static void main(String args[]){
   A a = new A();
   a. init();
private void init(){
  b = new B(This);
  b. do();
public void hello(){
  System.out.println("Hello");
public class B{
private A a= null;
public B(A aa){
  a = aa;
public void do(){
  a.hello();

Similar Messages

  • Can I use the screen/monitor from my G4-iMac-linking the two together?

    Bought a new Mini and am just wondering if I can use the monitor of the iMac if I link the two computers together?
    TIA
    R

    The only real option is a VNC solution like this:http://www.screenrecycler.com/home.html
    cheers
    mrtotes

  • Using the checking register template I've made multiple months and I want to total the data, is there a way I can link the sums?

    Same as topic.

    Hi Sandra,
    The Checking register's design assumes all transactions will be recorded on the single Transactions table.
    With a single Transactions table, it's relatively easy to pull a summary by month into separate Accounts Categories tables for each month and to use a separate calculation for the overall totals rather than linking the separate sums together.
    More detail about "I've made multiple months" might be useful to recommending a solution.
    Regards,
    Barry

  • Possible to put different emulators together?

    HI;
    I found that each manufacture has their own SDK for J2ME. But they are all modify from SUN's WTK. (I guess). the sun's wtk only support few phones. Is it a way to integrated the different amulator together to let testing easier?
    Thanks

    not really rember the reason you are using a manufacturers emulator is so to see if there are any hidden problems with the their implmentation OF MIDP..combining it with sun without using the manufacturers MIDP clases.zip would defeat that prupose

  • Join different movies together?

    I have several short movies, that I made in iMovie. When I use iDVD to burn them to a disc, the DVD-player stops playing after each movie. I'd like to use this for projections during concerts, so I need the whole thing to be continuous, I need to join the different movies together i.o.w. They should actually be no more than chapters of the same movie.
    Is there any way to do this in iDVD, or does that have to be done iMovies then?
    If not this, is there a way to get a "play all" function installed?

    iDVD doesn't support a 'play all' feature.
    Combine all the short movies together in iMovie HD and create chapter marks at the start of each movie (but not at the start of the movie). (iDVD HD is probably in a 'Previous iDVD version' (or something like that) folder in your Applications folder.)
    You can do it with iMovie '08 but that approach requires to go to GarageBand to add chapter marks.
    This way you will be able to play the entire movie from the beginning or start at any of the chapter marks if you so desire.
    F Shippey

  • Multiple objects to have the same rollover state at the same time (but link to different pages)

    Hi,
    I have a mac
    I would like to know how i can have multiple images with the same rollover states - but which show up at the same time on more than one image, (but each item to have its own linking property applied to it)?
    see image below: i want both box 'A' to pop with the same rollover state even if I'm hovering on just one of the boxes. But i want each of the boxes to link to different pages in my website.
    Ive tried grouping the images and moving them to their own layer, but the rollovers aren't 'linking' together on multiple objects
    help!
    thanks

    It's not, but you don't need that to achieve the behavior you've described. A1, a trigger, will have the states and hyperlink you desire. On rollover it will show its rollover state and will show its target container which will be directly on top of A2. It will look like a rollover state for A2. Repeat this for A2, B1 and B2 and I believe you achieve the behavior you've described. It's just a different way of approaching the problem (that happens to fit the tools available in Muse).

  • What is the best way to link 4 Airport units together wirelessly?

    Hi guys,
    I have a home with tick walls and creating  a decent wireless network was always a challenge. Recently I’ve decided to go for Apple products since I had a 4th gen airport express that worked well for airplay.
    I bought a new time capsule, airport extreme, and one airport express. So in total I have 4 apple devices that I can use for creating a good wireless network. But what I found out is that having a full signal doesn’t mean that you will have good speeds, and speeds are really slow like 3Mb/s max on some places on the house.
    The way that everything is configured at the moment is that I’ve configured the time capsule to be the main router and with the other three I’ve spreaded them over my house and selected the option to extend a wireless network using Airport Utility 6.2 on OSX.
    What is strange that I have a full signal on almost all corners but very bad speeds. I did some research and found a tool that would show what the less crowded channel that you can choose for you wireless network (http://tools.meraki.com/stumbler)
    In all my experience of extending a wireless network I’ve always used routers with DD-WRT so I could select the router to be a repeater bridge (and have two distinct networks, with different names) or link the routers with WDS linking them using the MAC address. In both cases all the documentation I’ve read recommended to set all routers of the same network with the same channel.
    When I used the stumbler tool to see what channel my network was, since it was set as automatic because it’s the recommendation of Apple documentation, I found out that all 4 routers were operating on different channel on both 2.4Ghz frequencies and 5Ghz frequencies.
    What is strange with the wireless network is that sometimes when it is really slow the speed of the internet, if I disconnect from the wireless network and connect again it gets a better connection, like I was connection to a closer router. But after sometime speeds get crappy again, like it changed to the far router again.
    My question is, what is the best way to link all this routers together wirelessly? Is there a way to make them to be all on the same channel? Is that important?
    On the Airport Utility 6.2 I don’t see any field that would make possible to link this routers using WDS. On the internet I found some documentation for configuring the routers with WDS with the Airport Utility 5.6.
    All my routers are updated to the latest version (7.6.3). Please let me know how to proceed to have a decent network on my house. I wouldn’t mind having the network set with different SSIDs but it would be better to use the same network name on all the house.
    Thanks in advance,
    Tiago

    At the moment it is configured like this.
    [IMG]http://img254.imageshack.us/img254/6403/capturadetela20130210s2.png[/IMG]
    My problem is that the signal its strong but speed isn’t. On Wifi stumbler I saw that every router is set to be on a different channel, they had to be the same no?
    If its really slow if I disconnect and connect again from the network. It gets faster, like it connected to a closer router or something.
    All are set to extend a wireless network.
    Regards,
    T

  • Linking different parameters together

    Hi,
    I would like to link different parameters together. Like the rotationX of one layer controls the translationY of another layer. How can I do this?
    Can I some how script it? (is it actually possible to script in motion at all? Are there tutorials for scripting in motion?)
    Or can I create my own behavior for my problem? I wasn't really able to costumize it the way I wanted with this "apply to" field that is in some of the behaviors.Is there a trick to it?
    Any ideas?

    Yes it would be nice to have some after effects style simple expressions for linking things together. But, the Apple way is more based around simply duplicating behaviors, ie setup a behavior (say a motion path) on one layer, and copy that to another layer. Otherwise copy keyframes, or do things with match moves....

  • How to link the same horizontal page for two different vertical pages without duplicate them?

    Hey guys,
    Is there a way to link the same horizontal page on two different vertical pages without duplicate the horizontal page?
    I have a doublepage of a book splitted in two parts in different vertical pages but i want link the fullsized image in the horizontal page for both of them. Got that? hahaha
    Thank you all

    Confusing But interesing.
    I think it's possible. I have a idea. It will need one advanced trick.
    To explain it, I need test simply haha.

  • When I click on a link the new tab does not open chosen link, it opens a different link entirely

    This has been a problem for a month. Before that it was never an issue. If I do a web search, find what I want then click on that link the new tab that opens is the selected link--it is something else entirely. I like Firefox and want to continue using it as my browser but I am not having the problem with Chrome at all so I think it is something with Firefox settings and not my computer a virus of some kind...but then I don't know much about these things.

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    <br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • How can I make a link a different color than the other links according to the current page?

    Hello.  I have created a navigation bar.  And I would like to style the links to have the current page link a different color than the other links.  For example, if all of the links have a black background, I would like to have the current page link to have a white background.  The reason that I would like to style them this way is so that the visitor knows what page is being visitied.
    I tried different ways but all of them did not show to make any change to the links.  This is what I have so far.  The links work, but all of them have the same color and background.  When on the home page, I would like to have the home page link to have a white background with black letters.  I would appreciate your advice.
    <head>
    ul {
        list-style-type: none;
        text-align: right;
        padding-top: 10px;
        padding-bottom: 6px;
        padding-right: 10px;
    li {
        display: inline;
    a:link {
        color: #FFF;
        background-color: #000;
        text-align: center;
        padding-top: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
        padding-left: 7px;
        text-decoration: none;
    a:visited {
        color: #FFF;
        background-color: #000;
        text-decoration: none;
    a:hover {
        color: #000;
        background-color: #FFF;
        text-decoration: none;   
    a:active {
        color: #FFF;
        background-color: #000;
        text-decoration: none;   
    a.menu:link {
         color: #000   
         background-color: #FFF;
         text-decoration: none;
    </head>
    <body>
    <div class="navigation">
        <ul>
            <li class="menu"><a href="index.html" target="_self">HOME</a></li>
    </body>
    Thank you very much.

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • How to create links to different files on the same page?

    Good day to all again,
    can someone please guide me through creating several links to different files on the same page. In other words, I am creating a photo page where my links are called Gallery 1, Gallery 2, etc... I would like to create links so when the User clicks on Gallery 1, they see Gallery 1 slide show in the frame; when the user then clicks Gallery 2, then they see Gallery 2 slide show in the window.
    My slide show files are done and I am using GoLive CS2. I have no knowledge of JavaScript or ActionScript/Flash.
    Any suggestions are highly appreciated.
    Thank you
    Alek

    Hi Diana,
    I'm a professional photographer and in the process of getting
    my finished site published. I used Coffeecup Photo Gallery. You can
    create multiple albums on the same page. Do a Google search for the
    address. It's easy, inexpensive, and it works. I tried to do this
    with the Photo Gallery in DW and FireWorks--but couldn't get it
    right. CC uses Flash and Javascript.
    Good Luck

  • Call logical links with different enhancement sets on the same business role

    Hello,
    I am trying to create a business role that contain logical links with different enhancements. I know how to choose an enhancement for the business role but I can't find a way, if possible, that one business role does it.
    I know how to give an option to choose different roles for the same user, i'm looking for a way to do this in the same window
    Thanks,
    Noa

    does not matter anymore

  • Urgent ! Assigning (or Linking ) the same workbook into two different roles

    Hi Gurus,
    Coul you tell how to link the same workbook to two different roles.
    I am assigning the same workbook to two different roles, but in the second role the workbook is displaying with different structure than in the first role. I want the workbook should be displayed with same structure in both the roles.
    This is Urgernt.
    Thanks in advance.
    Best regards
    Hari

    Hello hari,
    Both the roles should diplay the same layout for a single workbook.
    please ensure that both the users(with these 2 roles) have similar (all the other)authorisations.
    it's possible that one of the users may have further restrictions in authorisations. check out for z-authorisation objects if any.
    hope it helps..
    thanks,
    (*Don't forget to Assign points on SDN)

  • HT2506 After I save my pdf document, the links to different pages within the pdf take me to the wrong page. How do I fix it?

    After I save my pdf document, the links to different pages within the pdf take me to the wrong page. How do I fix it?

    May you please elaborate... How are you creating the pdf documents (procedure, software, etc.)? How are you inserting links into your documents?... etc., etc.

Maybe you are looking for