Is there a better / easier way to know who my parent class is?

Hi,
I have a class that has an inner class, and i need to know from the inner class, how my parent is. sounds weird, i know....someone asked me how to do this, and the only thing i gave them was this:
public class A {
       public A() {
                    B myB = new B(this.getClass());
      class B {
                public B(Class c) {
                          System.out.println("the class is: " + c.getName());
}this person, seems to think there is some easier/better way of finding out who the parent class is, perhaps using a keyword, but i didnt know.
so, can u tell me? or is my solution adequate?
thanks

so i would use it like this....
public class A {
       public A() {
                    B myB = new B();
      class B {
                public B(Class c) {
                          Class[] classes = getClass().getDeclaringClass();
thanks

Similar Messages

  • Is there a quick easy way to edit a wmv in Adobe Premiere?

    Is there a quick easy way to edit a wmv in Adobe Premiere?

    I don't know Microsoft's current edit program (and you don't provide your Windows version) but to edit Microsoft's codec with a Microsoft program search...
    http://search.microsoft.com/search.aspx?mkt=en-US&setlang=en-US

  • How can I share this link Tell Congress to stop bulk collection of our personal information. there is no easy way to do this other then copy the entire link

    I want to share the link and post the:
    Tell Congress:
    It’s Time to Stop Mass Surveillance
    Mass surveillance threatens people’s privacy and security online.
    Tell Congress to stop bulk collection of our personal information.
    there is no easy way to post this or forward without sending the entire page link and nobody will touch those if something like a preview doesn't show up, just looks like a bunch of unsafe links to most people, you need to have a share button on this if you really want us to share it

    Heres the link to "Take action" http://mzl.la/1CgTnKg. In the future if you want to copy links, right click the address bar, and the whole link should be selected, then click "Copy" in the menu that comes up.
    Have a great day!!
    Jon

  • Is there a quick & easy way to replace an image within an image frame?

    Is there a quick and easy way to replace an image in an image frame that is already set up with the proper effects?
    In my example, I have a photo grid and just need to replace the photos periodically. Everything is already in place in the grid. I don't want to recreate the grid on the page.
    I thought that I could have clicked to get the brown frame for the image and placed a new one, but that didn't work. Or, I could have right clicked and found something like "replace image", but that didn't work.
    How can I quickly and easily just click on the image I need to replace and replace it with another one?

    There is an easy way to do this. Click on the image you would like to change and then change the fill to the new image. You will see the fill option in the upper left when you have the image you would like to change selected.

  • HT5622 Hello - my wife and I use the same appleID (legacy of our first ipod) and now that we've gone to the cloud with multiple devices, is there a smart, easy way to either segregate the data in the iCloud to each of our respective devices or ??  Thx

    Hello - my wife and I use the same appleID (legacy of our first ipod) and now that we've gone to the cloud with multiple devices, is there a smart, easy way to either segregate the data in the iCloud to each of our respective devices or ??  Thx in advance ...

    Hello eagjdw
    You can keep the one Apple ID for purchases and then create another one for a personal account for contacts and calendars. The article below will assist further
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Is there a way to know who are accessing our SAP instances.

    Hello Friends,
    We have 2 servers (one for ERP and another for XI). Is there a way to know who are all accessing our servers from outside ?
    Also, which are user IDs other than SAP* and j2ee_admin that has admin rights for which we have to change the password once a consultant leaves the company.
    Your suggestions and recommendations will be highly appreciated.
    Thanks
    Ram

    Hi Ram,
    We have 2 servers (one for ERP and another for XI). Is there a way to know who are all accessing our servers from outside ?
    SMGW --> Goto --> Logged on Clients
    Also, which are user IDs other than SAP* and j2ee_admin that has admin rights for which we have to change the password once a consultant leaves the company.
    SUIM --> User --> By Critical Combinations of Authorizations at Transaction Start
    Hope this will help.
    -Pinkle

  • I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    Check the eBay listing. Did it state the device was Activation Locked? If not, then make a claim as Meg stated and get a refund. You will not be able to activate the phone and no one can help you contact the owner, unless that is the person that sold the device. If they cannot remove the phone from their account because it is not theirs, then refund is your route. Even Apple cannot assist with locating the previous owner.

  • Is there an easy way to know which app(s) are causing spike in Data Usage?

    I have an iphone 4, but son and daughter have iphone 5s and my wife a lumina.  We all spiked in data usage last month, how do we determine what caused this?  Was it Facebook or Pandora?  Some other app? There must be an easy way to find out. Please advise.  Thanks!

        GV2,
    I'm glad Mrhelper was able to shed some light on this for you! In iPhones, the amount of data you're seeing under each app is for the "Current Period." Just above that list you'll see info about the Current Period and Current Period Roaming. This is just an overall snapshot of total data usage for that period of time. The Current Period does not reset on its own, so it will be counting everything from the last time you reset it through now. You can reset it by scrolling to the bottom and tapping on "Reset Statistics."
    So, for example, if you reset your statistics 3 days ago and then there's 1GB used under App Store you'll know that over the last 3 days 1 GB of data has been used for the App Store.
    SarahO_VZW
    Follow us on Twitter @VZWSupport

  • Is there a new easier way to combine all calendars into one?

    This is a two-part question...
    I was wondering if anyone had found an easier way to do this instead of exporting a calendar and importing into a main calendar, and repeating untill all calendars were in one. I have 8 calendars on my computer, but then another 11 on iCloud. These were done over years and had I known how confusing it would get I would never had created more than one or two. I would assume the iCloud calendars with the same names as my computer calendars would be sync'd and have same info?
    But also, in many of these calendars I have multiple entries. "Doctor appointment at 3:00"... Maybe 8 times on one particular day. Those multiples are scattered about through all calendars. It's a mess! lol! Is there a way to globally delete duplicate entries on the same day and time? Or must that be a manual task?
    Any help someone could give me would be greatly appreciated, and Thank You in advance!!
    Earth Guest

    Okay, I realized it wouldn't take much time to export and import all those calendars into a new all-inclusive calendar, so I've done that. One at a time I exported each calendar to a folder on my desktop. Then I made the new calendar and imported from that "exported" folder, each cal that I exported. I wonder how confident I can be that everything came into the new calendar? I mean, it went back to 2006 or so.
    I want to delete all the old calendars. If I do that, will iCloud delete those calendars as well, or do I have to manually delete them from iCloud or it will sync and add back to my computer what I had just deleted? I guess iCloud will update and sync to the new single calendar?
    I know I'm asking a lot of questions. I'm just scared of losing years of records of dates I may need to remember. I'm not a very technical person (as you may have guessed :-)!

  • Is there a relatively easy way to view deleted safari history or pages viewed for an iphone? Browser has been cleared, cookies have been cleared, but I'm wondering if the information is still accessible in my phone somehow?

    As I say, internet has been cleared, and under settings, the advanced cookies & history has also been cleared. Is there an easy way of viewing this info again?
    Also, the "private browsing" option, is there a way of disabling it or at least having that option password protected?
    And what is "web inspector"? Is that something that I can set up on my pc that will monitor iphone activity?
    Thanks!

    EarthAngel6543 wrote:
    I'm concerned about restoring my phone, I'm not exactly computer savvy, and there are some game apps on my phone that I'd be afraid of deleting.
    Just wondered if there was another way?
    If doing a restore is the only way, would someone be able to tell me how to do it and whether or not I will have a heck of a time getting all my info & apps back onto my phone afterwards?
    Thanks!
    How does this relate to your first post?
    Are you talking about restoring as new? or restoring to a backup?
    Why are you restoring?
    If it is to recover History  and you think that you have a backup that contains the missing history you could restore to that. Doing this will restore your iPad to the state that it was in at the time of the backup, Apps, Games, etc.
    Note that there are PC and Mac applicatons that can read iPad backup files and extract information. Check the internet for these. I do no know if they extract Safari History.

  • Is there just an easy way to email my sicurity questions because i have forgotten them?

    I have forgotten my security questions and now i can't buy anything on the apple store! I would like to know an easy way to find what the answers are. I have been looking for ages but there is no link that says cannot remember your answers as people have been telling me to click on. please help!

    Ok I found this by searching the forum
    Frequently asked questions about Apple ID - http://support.apple.com/kb/HE37 --> Can I change the answers to the security questions for my Apple ID?  --> Yes. You can change the answers to the security questions provided when you originally signed up for your Apple ID. Go to My Apple ID (http://appleid.apple.com/) and click Manage your account.
    Forgotten security questions - https://discussions.apple.com/message/18402551  andhttps://discussions.apple.com/message/18625296
    More involved forgotten question issues -https://discussions.apple.com/thread/3961813
    Kappy 09/2012 post about security questions -https://discussions.apple.com/message/19569468
    John Galt's tips (09&11/2012) - https://discussions.apple.com/message/19809294 andhttps://discussions.apple.com/message/20229239
    If none of the above work, contact iTunes Support athttp://www.apple.com/support/itunes/contact/ and follow the instructions to report the issue to the iTunes Store.

  • Is there not an easier way to rate apps?

    So I've seen the posts saying that I cab rate an app on my iPad in the App store, but is there really not an easier way? As I am understanding this, I have to basically search for each app one by one - apps I've already got installed - and then rate them from the app store. This makes no sense at all. A) The only easy access to rating an app is basically as you are first downloading it on your iPad. B) This seems to really devalue the usefulness of something like the genius match thing that will suggest apps based on what I like. Sorry, I am not going to search for each individual app then rate it ... I don't understand why it just won't take me there from the "purchased" tab ... or am I missing something?

    Product feedback
    http://www.apple.com/feedback/

  • Is there an easy way to know if a vi within a LLB not being use by a Labview Application

    To All,
    I have developed a Labview application over a year that contains a number of LLBs.  There are significant number of VIs within those LLB files that were written but have not been called  by the application.  I am trying to optimize all LLB files to exclude those unused VIs.  Because there are many of them, the task to find out which Vi is being used and which one is not become very tedious.  First question: Is there a way to automate the process?  Second question: Does a compiled Labview application include all used and unused Vis from the LLBs in the .exe file?  I am very appreciate any inputs from this community.
    A Labview User  

    Ben wrote:
    In pre-LV 8 you could do a "Save with options..." and choose development distribution, single prompt preserve hiarchy and LV will pick-up all of the used VI's and plomp them down in a new location leaving all of the used behind as well as fixing up a of the linkages to point at the new location.
    In LV 8 and beyond you can create a Source Distribution in the project and acoomplish the same thing.
    In LabVIEW 8+, you can get something similar to the first option by selecting "save for previous" and then pick the existing version (yes, it's there!).
    LabVIEW Champion . Do more with less code and in less time .

  • How do you attach multiple pictures to an email? I use yahoo, presently I copy and paste each pic separately , having to go back and forth from my pics and email. I know there's an easier way. I currently use an iPad 2 and this is my first apple product.

    I currently use an iPad 2,how does one go about attaching multiple pictures to a yahoo email? Presently I am having to copy then paste each picture
    Separately , going back and forth from my picture roll to my email. I tried to copy and paste multiple pictures but it would only paste the last picture
    I copied. I am new to apple, so any help would be appreciated .

    If you use the Mail App and configure a Yahoo account you can then select up to 5 pictures from the Photo App and mail them as a single e-mail.

  • Is there a quick, easy way to delete all the "lost" songs from my Library?

    OK, I'm storing all my music in my iTunes folder, which I moved to an external HD. In my iTunes Library (within the application itself), there must be thousands of MP3s listed that I no longer have the MP3 files for. Is there a quick way to update the library so that it only lists what music I actually have on my HD? Basically, I want to get rid of all the songs that show up in my library which I no longer have on my HD. Is there any way to do that?
    thanks!

    Thank you for your reply Diane. I'll look into that site. I probably did delete all the files through the finder, but to be honest, I don't know how they all got into my Library to begin with. Is there a way to erase my whole list and then rebuild it based on what files are contained in my iTunes folder? that might be easier.

Maybe you are looking for

  • Hoe to connect java with mysql 5.0

    I have installed the new Os. in that RHE-5 Os is there, now I want that java can connect ot mysql but , its not able connect with mysql so please guide me.

  • Different number range for Purchase requistion

    Hi, While converting Planned order to Purchase requisition (Manual Run), i need different number range for Purchase requistion for different plant. I maintained different number ranges in OPPQ, and maintained number range in OMI3, the number range wh

  • What Javascript event is triggered in moving shuttle items to the right?

    Application Express 3.2.1.00.10 I've tried onclick, onblur, onfocus, onchange, but none of them fires immediately after moving all shuttle values to the right using the >> (select all). My alert message is only displayed once the user selects all and

  • Final Cut Express and logic control

    Hi, has anyone ever achieved to combine final cut express and logic control? I'm a logic audio user and Iwould be greatful to influence major features of final cut with the controller "logic control XT" and let them work together. Thanks for your hel

  • Installing Lightroom

    Hi. I have purchased and installed Adobe Lightroom 2. When I run Lightroom from a different user, it asks for the registration key again. This I don't want to input in case it uses up a licence. I've considered unistalling from the original user but