Using Reflection to check a value in an Array and then print out the array

Hi,
I have a int Array say,
static final int [] myNumbers = {407,408};
In the program if the input value is either 407 or 408, the output should be the field name myNumbers.
I am experiencing problem with arrays. For other types ( like int ),
I was able to successfully do it.
Thanks in advance.

Check the reflection category on esus:
http://www.esus.com/docs/GetIndexPage.jsp?uid=221

Similar Messages

  • I have a Dell Inspiron 530S computer and a Dell Photo 926 printer. Using Firefox with the printer, how do I scan a blank form into the computer and fill it out there and then print out the completed form with the printer?

    Basically, the problem arose when I got a package from the Veterans Administration requiring me to fill out some complicated forms. Using my equipment and Firfox, I have been unable to do it.
    == This happened ==
    Not sure how often
    == I applied for Agent Orange evaluation

    That's not really a Firefox support issue.
    Check with Dell support and ask if the scanner software is capable of saving the form as an actual form, instead of as an image as most scanners do.

  • Today all my Bookmarks disapeared from Safari, when i checked my iphone they were there and then went away the same happened on my ipad. Any ideas on how to restore?

    Today all my BookMarks disappeared in Safari, when I checked my iphone I watched them disappear from there and the same on my iPad. I then thought why not check my Parallels side and Windows Explorer. They were there for a few seconds and then also gone. Any ideas on how to restore and stop this from happening again? My iCloud setting are set for Safari sync.

    Then you have misunderstood what iCloud is.
    First. It is not a back-up service. It is a sync service.
    That distinction is very import. A back-up service would have backed-up your bookmarks but iCloud's function is to synchronize your data, in this case your bookmarks, to all your devices. A backup service, by it's very nature, would allow you to roll back to a previous version of your data or file. No such roll back function is present in iCloud's services.
    For example, if you add a bookmark to Safari on your Mac that same bookmark will be added to all your other devices that are connected to your iCloud account. Also, if you delete a bookmark it will be deleted from all those devices.
    iCloud does not make a distinction between deleting one or all of your bookmarks and it will do the same to all your devices. It does not know that was not your intention. That is why it is very important to have Backups and Apple makes it very easy using Time Machine and a simple hard drive connected to a computer.
    Let's see if your bookmarks have actually been deleted or if there is another problem.
    Your bookmarks are stored in a .plist file the following directory, ~/library/Safari/Bookmarks.plist
    To get to that directory go to the Finder, select the Go to Folder… menu item in the Go menu and enter ~/library/Safari/ in the field provided. There you will find the Bookmarks.plist file.
    Select it and hit the space bar on your keyboard to see a preview of the files content. Does it still contain references to your bookmarks? If it does still contain references to your bookmarks then something else is going on and we'll have to find a different solution.

  • Powershell script - how to read a registry hive and store the value in text file and then again read the text file to write the values back in registry

    Hi All,
    powershell script Method required to read a value from registry and then taking the backup of that values in some text file.
    For example the hive is
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
    and under path i need to take back up  of values in some text file and then put some value in the registry after back is taken in text file.
    Also how to read the text file values so that we can again write to registry hive  back from the back up text file.
    Your help is much appreciated.
    Umeed4u

    I think you need to read this first:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/a0def745-4831-4de0-a040-63b63e7be7ae/posting-guidelines?forum=ITCG
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • When I external edit an aperture photo using Photoshop Elements 9 and then get out, the changes are not reflected in Aperture when I return - this used to work for me but doesn't seem to have for some time - help please?

    Have used Aperture for some time - at some point this stopped working - not sure when
    workflow:
    click photo and elect to use the external editor (Photoshop Elements 9)
    Copy of the photo is created in Aperture with the "O" badge and I am rolled out to Photoshop
    Have to change the type to 8-bit in Photoshop to start making changes
    When done and I exit I am prompted to save the photo
    On returning to Aperture however the "O" badged photo does not get updated/reflect my changes
    Other Things:
    I can find a changed photo sitting in the Aperture Library using finder or Photoshop itself - so I know changes have been made a new file saved (TIFF).
    I am wondering if I am missing some (new) preference such that the changes are not proerly being saved for re-display/storage in the Aperture Library
    I am running Lion OSX at the moment but the behaviour was the same under Snow Lepoard versions.
    Current version of Aperture is 3.1.3, Elements is 9.0
    Any help/suggestions greatfully received

    Try using psd.  Some rerports indicate some confustion between the apps with TIFF.  See:
    https://discussions.apple.com/message/15921933#15921933
    I cannot confirm, nor test, since I use PS CS5, and not Elements.
    Ernie

  • How do I read a hex value and then convert to the binary equivalent?

    I am reading hex values from a register on my unit under test. I only want to monitor certain bits in the hex value to check a status. I have everything down to run the program except how to read my hex values in binary form. Any suggestions out there?

    If this is just a matter of display, then right click and choose "Format & Precision...". Beware, this works only with integer indicators (I8/16/32 and U8/16/32).
    If the problem is to extract a bit value in a specific position, then go to the "Advanced >> Data manipulation" sub-palette where are all bit manipulation functions (rotate, shift, split...).
    Don't forget either the logical functions (And, Or...) in the boolean sub-palette, where is also the "number to boolean array" function (to be used in conjunction with an index array node).
    Another option is to use string conversion functions, in the "String >> String/Number conversion" sub palette.
    Have a look to the attached image.
    Enough ?
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Hex_&Bin.tif ‏20 KB

  • Acrobat on OSX does not use printer preset. Every single time I have to print I have to click printer and then print to load the preset and then click print again from the main dialog. I am printing to a Xerox that has the copier code in the preset so if

    Acrobat on OSX does not use printer preset. Every single time I have to print I have to click printer and then print to load the preset and then click print again from the main dialog. I am printing to a Xerox that has the copier code in the preset so if I don't do this it will not print. This has been broken for in every version I have tried. This extra clicks are taking years off my life. Did I remember to do the extra clicks? I don't know, I guess I will run down the hall and check. Please fix this.

    What operating system are you running? I assume they had you install the latest BIOS. True? If it were mine, I would suggest forcing it to use integrated graphics (in the BIOS) to rule out a problem with the NVidia driver.

  • Help with printing out the # of quarters, nickels, dimes, and etc... using

    Hi, im new to java and im using a program called blue j.
    anyway heres my question.
    , I recommend you dont do the program for me, but rather help gear me in the right direction of things.
    In this program they want me to have it print out the # of dollars,quarters,nickels,dimes, and pennies.
    They have provided me with a base program to start off with which is this.
    import chn.util.*;
    public class ComputeChange
       *  The main program for the Change class
       * @param  args  The command line arguments - not used
      public static void main(String[] args)
        double purchase, cashPaid, temp;
        int change, remainder, dollars, quarters, dimes, nickels, pennies;
        ConsoleIO keyboard = new ConsoleIO();
        System.out.print("Enter amount of purchase --> ");
        purchase = keyboard.readDouble();
        System.out.print("Enter amount of cash paid --> ");
        cashPaid = keyboard.readDouble();
        temp = cashPaid - purchase;
        dollars = (int) temp;
        temp = temp - (int)temp + 0.0000001;
        change = (int)(temp * 100);
        System.out.println();
        System.out.println("$" + dollars + "." + change);
    }Ive been given the amounts 23.06 for amount of purchase
    and 30.00 for the amount paid. that should give me the difference of $6.94
    It should print out the amount of change as the following
    6 dollars
    3 quarters
    1 dime
    1 nickel
    1 penny.
    IVe tried a few methods for printing out the # of each coin type, but i simply dont get how they are using temp or what type of funciton i need to follow. Any hints or pointings in the right direction would help. Since i need to learn this.
    Thanks a lot and i hope i can get some tips. !
    ~Jbinks

    And here's my contribution to the scratch batch... :o)
    class Coins {
        private java.util.Map<Coin, Integer> count = new java.util.HashMap<Coin, Integer>();
        enum Coin {
            DOLLAR(100), QUARTER(25), DIME(10), NICKEL(5), PENNY(1);
            private final int value;   
            Coin(int value) { this.value = value; }
            public int value() { return value; }
        public Coins(int centsValue) {
            for (Coin c : Coin.values()) {
                count.put(c, centsValue / c.value());
                centsValue %= c.value();
        public void display() {
            for (Coin c : Coin.values()) {
                System.out.println(c + ": " + count.get(c));
    public class CoinsDemo {
        private static java.util.Scanner keyboard = new java.util.Scanner(System.in);
        public static void main(String[] args) {
            int price = getPennies("Enter amount of purchase --> ");
            int paid = getPennies("Enter amount of cash paid --> ");
            new Coins(price - paid).display();
        private static int getPennies(String prompt) {
            System.out.print(prompt);
            double d = keyboard.nextDouble();
            System.out.println();
            return (int)(d * 100);
    }

  • I have received a "check your billing information" pop up and a countdown but the hyperlink to resolve it comes up with an error page?

    I have received a "check your billing information" pop up and a countdown but the hyperlink to resolve it comes up with an error page? My billing information hasn't changed and I can't seem to use the chat to resolve this problem.

    Hang in there. Getting in touch with live support by web chat or phone is your only way to resolve such issues, annoying as it may be.
    Mylenium

  • Using applet to select a part of an image and then save it

    Hi ,
    I want to use applet to select a part of an image and then save that particular selected part to a server. can anyone provide me a code for this. I have found codes on the sun site which help in uploading an image but I am having trouble in trying to select a part of the image.

    Sorry to get back to you so late, but I was away from my computer this afternoon.
    I'm not sure just what you are after. I do see that you have positioned the tree on the labels. I went to the web site for the label company, and their instructions are not too helplful.
    http://www.pixentral.com/show.php?picture=15sBkl9OZE9xSkHoLMxgwjTFv2VCg1
    I changed the white portion of 1 label to black - - this can be any color. To do this use the magic wand tool, tolerance=10 worked for me, then go to Edit>fill selection.

  • When i try to download the newest version of itunes it says "the feature you are trying to use is on a network resource that is unavailable" and then it gives me an alternate path to a folder containing the installation package for itunes64.mis, help

    when i try to download the newest version of itunes it says "the feature you are trying to use is on a network resource that is unavailable" and then it gives me an alternate path to a folder containing the installation package for itunes64.mis, help

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    I want to be able to use airplay to stream audio to another iOS device, and then use that audio stream to be used when recording video instead of the built in microphone / microphone input. Is this possible?

    A third-party app probably cannot obtain a stream from another app. To the best of my knowledge, such a capability is not provided in the software development kit, apps being "sandboxed" from each other and so allowed to communicate only in very specific and limited ways.
    I'm not completely sure what you mean by "limitations on video capture". An iPhone, to the best of my knowledge, can natively record video only through it's built-in camera, and audio while doing video recording only through the built-in microphone or mic/headphone jack. There might be a video recording app that would allow audio input from an external device connected to the dock connector, but I'm not sure.
    Regards.

  • How do I print out the value returned by a method in main??

    I'm a total newbie at java, I want to know how I can print out the value returned by this function in the "Main" part of my class:
    public int getTotalPrice(int price)
    int totalprice=price+(price*0.08);
    return totalprice;
    I just want to know how to print out the value for total price under "public static void main(String[] args)". thanks in advance,
    Brad

    Few ways you could do it, one way would be to create an instance of the class and call the method:
    public class Test
        public double getTotalPrice(int price)
            double totalprice = price + (price * 0.08);
            return totalprice;
        public static void main(String[] args)
            Test t = new Test();
            System.out.println(t.getTotalPrice(52));
    }Or another would be to make getTotalPrice() static and you could call it directly from main.

  • Hello. So I have used my iPod touch 4g for 2 years now and need to change the battery. My question is: will I lose everything I have on my iPod like my music,pictures and apps if I change the battery on my iPod touch 4g?

    hello. So I have used my iPod touch 4g for 2 years now and need to change the battery. My question is: will I lose everything I have on my iPod like my music,pictures and apps if I change the battery on my iPod touch 4g?
    Thanks for answer

    If you go to Apple, they will not replace your battery, but exchange your iPod for a refurbished iPod of the same model with a new battery.  Therefore you will lose everything that is not backed up.  If you change it yourself or have a third party change it, you will most likely not lose anything (but still best to make a backup as lllaass suggested).

  • I recently inherited a restored iPhone 5 from my uncle and its needs a sim to be activated, could i use my friends sim just to activate my iPhone and then give the sim back once its activated without affecting his contract and later on get a sim ?

    I recently inherited a restored iPhone 5 from my uncle and its needs a sim to be activated, could i use my friends sim just to activate my iPhone and then give the sim back once its activated without affecting his contract and later on get a sim for myself and a contract for me and it all be normal??? Thanks

    The phone MUST have a SIM present in order for activation to complete. The process will not finish otherwise.
    For the OP:
    If the iPhone 5 is locked to a carrier, you must use a SIM from that same carrier. Otherwise I think you would be OK borrowing the SIM to activate the phone.
    ~Lyssa

Maybe you are looking for

  • Problem with checkbox value and app.settings.getSetting()

    Hello everyone. I`ve got a problem with getting saved settings for checkbox. Saved settings doesn`t apply on checkbox value. It`s strange, but it always "true". So here piece of code: checkMe = 11;    //any value for the first time running if (app.se

  • Create Credit memo with reference to billing in VF01

    Hi all: I want to create a credit memo with direct reference to the original billing. Thus the creation of CMR is not required. This is the new feature as of release 4.5a. In SAP system, I've done the configuration for copying control from billing do

  • What does the new in Pointbase JDBC Url mean?

    what does the new in the URL mean? It is out of ServiceBus config: jdbc:pointbase:server://localhost:9193/weblogic_eval;new thanks, Barossa

  • HR ABAP QUERY

    HI I HAD SOME PROBLEM i had to write a program for displaying cource cancilation i have to take the selection screen elements as otype from hrp1000 value as 'd' date select-option from the selection screen i have to get the values of objid and otype

  • Gpt protective partition

    Background...     The laptop died in the middle of writing an email.  Power will not switch on from battery or from power suply.  Removing the HDD and replacing it with another (or leaving it out) does nothing, it never gets to the POST.  Conclusion