Is it possible to get a variable if I only know the variable by it'

Is it possible to get a variable if I only know the variable by it's string name?
In my case I would like to call Resources.GetStringToDisplay("TEXT_0") and get the string "bla bla 0"
public class Resources {
public string GetStringToDisplay(String s)
{          //how can I to return the value of one variable
return ............;
public static String TEXT_0="bla bla 0";
public static String TEXT_1="bla bla 1";
public static String TEXT_2="bla bla 2";
public static String TEXT_3="bla bla 3";
Thanks

NO you can not get Variable value by camparing string value in J2ME (because J2ME is not supporting reflection package). But you can do one thing to get same functionality.
public static String TEXT_0="TEXT_0@bla bla 0";
public static String TEXT_1="TEXT_1@bla bla 1";
public static String TEXT_2="TEXT_2@bla bla 2";
public static String TEXT_3="TEXT_3@bla bla 3";
public string GetStringToDisplay(String s)
if(TEXT_0.startsWith(s) )
return TEXT_0.substring (TEXT_0.indexOf('@')+1, TEXT_0.length());
else if(TEXT_1.startsWith(s) )
return TEXT_1.substring (TEXT_1.indexOf('@')+1, TEXT_1.length());

Similar Messages

  • Is it possible to get a camera memory card out of the cd drive, is it possible to get a camera memory card out of the cd drive

    Is it possible to get a camera memory card out of the cd drive

    http://www.youtube.com/watch?v=hpwDfpH4hR0

  • Hi, I have an iphone 5 and unfortunately got sat on and is now bent, it worked fine bent for 3 months as the glass did not break, today how ever the screen has stopped working. Is it possible to get hold of another casing and have the electronics changed

    Hi, I have an iphone 5 and unfortunately got sat on and is now bent, it worked fine bent for 3 months as the glass did not break, today how ever the screen has stopped working. Is it possible to get hold of another casing and have the electronics changed ?

    You didn't look hard enough:
    Out-of-Warranty Service
    If you own an iPhone that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will service your iPhone for the Out-of-Warranty Service fee listed below.
    iPhone model
    Out-of-Warranty Service
    iPhone 5s, iPhone 5c,
    iPhone 5
    $269
    iPhone 4S
    $199
    iPhone 4, iPhone 3GS,
    iPhone 3G, Original iPhone
    $149

  • I recently downloaded Mountain Lion and am not happy with it at all.  Is it possible to get rid of it and return to the OS X version that I had previously?

    I recently downloaded Mountain Lion and am not happy with it at all.  Is it possible to get rid of it and return to the OS X version that I had previously?

    rwilkof wrote:
    I recently downloaded Mountain Lion and am not happy with it at all.  Is it possible to get rid of it and return to the OS X version that I had previously?
    Yes, just reinstall from your Time Machine backup you made before updating to Mountain Lion.
    Cheers
    Pete

  • Text in fillable text form gets cut off and appears only in the lower half of the text form?

    I'm trying to create a text-fillable PDF form. However, when I add a text form, the text I test in it gets cut off and appears only in the lower half of the text form by default (see 2nd photo below). How do I correct this and make the text take up ALL the space in the form like the 1st photo?

    Have you set the text field properties options to multiline? Is so, please attach a screen shot of that dialog box so we can see how it is set.

  • [svn] 3921: Fix for - @inheritDoc tag not working for get/ set overrides when you only override the setter of a base class

    Revision: 3921
    Author: [email protected]
    Date: 2008-10-28 06:23:00 -0700 (Tue, 28 Oct 2008)
    Log Message:
    Fix for - @inheritDoc tag not working for get/set overrides when you only override the setter of a base class
    QE Notes: Baselines for framework test will need to be updated.
    Doc Notes: None
    Reviewer: Paul
    Bugs: SDK-17304
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17304
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

    Revision: 3921
    Author: [email protected]
    Date: 2008-10-28 06:23:00 -0700 (Tue, 28 Oct 2008)
    Log Message:
    Fix for - @inheritDoc tag not working for get/set overrides when you only override the setter of a base class
    QE Notes: Baselines for framework test will need to be updated.
    Doc Notes: None
    Reviewer: Paul
    Bugs: SDK-17304
    tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17304
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

  • Is it possible to get scope Variables in an EJB SessionBean

    Hello!
    I need to get scpoe variables in an EJB SessionBean. Is it possible?
    Thnaks in advance!

    ADFContext ctx = ADFContext.getCurrent();
    Map<String, Object> map = ctx.getViewScope();
    For example

  • HT4061 is it possible to unlock a japan iphone and to know the service provider bought it second hand

    A friend of mine have received a second hand iphone bought in Japan and we try it here in the UAE unfortunately it was locked and we don't know the service provider.  Is there any possibility to check the service provider and have it unlock so he could use it here.  I will come back and check the phone details

    If the phone originated in Japan, then you are out of luck because none of the Japanese carriers offer unlocking for their phones.
    Bottom Line:  You can't use the phone in the UAE and you will have to buy another phone if you want to use it.

  • Itunes Library has deleted itself, is it possible to get songs off my phone back into the library as i don't know when my last back up was?.....please help.

    SO MY ITUNES LIBRARY HAS DELETED ITSELF...
    IM REALLY NOT VERY TECHY SO I REALLY COULD USE SOME HELP
    IS IT BPOSSIBLE TO GET THE MUSIC OFF MY PHONE AND RE ADD IT TO THE LIBRARY THAT WAY?
    OR COULD I DELETE ALL MY ITUNES SOFTWARE AND RE INSTALL IT AND THEN SYNC MY PHONE, WOULD IT COME BACK THEN?
    SORRY IF THESE ARE REALLY STUPID QUESTIONS
    ALSO DOES ANYONE KNOW WHY THIS MIGHT HAVE HAPPENED?
    IVE READ SOME OTHER POSTS AND THEY SAY TO LOOK AT YOUR ITUNES FILE BUT THEY ARET VERY RECENT FOR SOME REASON AD I WILL HAVE LOST ALOT OF SONGS
    ANY HELP GREATLY APPRECIATED

    Hey bryce255,
    Thanks for the question, that definitely sounds frustrating. Luckily, we have steps available that may be able to restore your previous library:
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967
    Resolution
    1. Quit iTunes.
    2. Download and install the latest version of iTunes.
    3. Use the Finder (Mac) or Windows Explorer (Windows) to go to the iTunes folder that contains the iTunes library files:
    Mac OS X
    /Users/username/Music/iTunes/
    Microsoft Windows Windows XP and Windows 2000
    \Documents and Settings\username\My Documents\My Music\iTunes\
    Microsoft Windows Windows Vista and Windows 7
    \Users\username\Music\iTunes\
    4. Drag the iTunes Library file from the above location to the Desktop.
    5. Open the Previous iTunes Libraries folder in the iTunes folder.
    6. Locate the file named iTunes Library YYYY-MM-DD where YYYY-MM-DD is the date you upgraded iTunes (Year-Month-Day).
    7. Drag this file to the iTunes folder (the enclosing folder).
    8. Rename this file to iTunes Library.
    9. Open iTunes.
    You should now see your missing content in iTunes.
    If the above does not resolve your issue, you can learn about re-creating your iTunes library:
    iTunes: How to re-create your iTunes library and playlists
    http://support.apple.com/kb/HT1451
    Thanks,
    Matt M.

  • Is it possible to get music off an ipod touch onto the computer so that I can put it on my phone?

    Can I get old music from an ipod touch onto the computer so that it can be transferred onto an iphone?

    Yes:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Cannot see video, I get green screen and can only hear the contents

    I've unintalled flash player and adobe shockwave and re-installed it again but I am getting the same problem. Video is not working. I dont know what to do.

    Hi  ,
    Thank you for visiting the HP Forums! A great place where you can find solutions for your issues, with help from the community!
    I came across your post about the Notebook, and wanted to assist you! I have looked into your issue about yourwith the Video not working correctly or green. Try clicking on the green screen, in the tab named Local Storage and put 10 KB and the green screen should disappear. Here is a link to the HP Support Assistant if you need it. Just download and run the application and it will help with the software and drivers on your system that need updating as the graphic driver could need updating. Have you tried another browser? This link will help you update your browser if needed. Let me know how this goes. Thanks.

  • HT204053 How do I get into my Icloud account without knowing the password ?

    I reset my phone and i don't remebemer my icloud password and every time i try and change it i never get an email saying reset

    Welcome to the Apple Community.
    Put in a request for another verification e-mail to be sent to you.
    Start here, change your country if necessary and go to manage your account.
    Also check your Mail rules and filtering, the verification mail may be going to a junk folder or even being deleted altogether. You may also wish to contact your mail provider to see if their spam filters are removing the email before it gets to you.

  • Getting Blue Screen --I've Only Had the HP Mini 311 for One Week

    Do you have an HP Mini 311? I have had my HP Netbook for one week and I keep receiving the blue screen.  I installed Adobe Lightroom yesterday and I received it after the install.
    Is this common with HP Mini 311s? 
    Is it worth returning to Verizon or can I get it fixed by contacting HP support?

    Try removing your sim and insert it again and make sure that its clean as well as the sim tray. insert it securely locked in place. See if it works, quick fix. If not try to use a different sim or try your sim to a different h/s. For you to be able to isolate if its with your sim or iPhone. Tricky Tips!

  • Don't know apple id and email. I only know the password. Is there some way I can get into the account?

    I back up my friends phone to icloud and then reset the phone. She doesn't remember the apple id and the email that is associated with the account. She only knows the password. Is there a number i can call or some other way to access the account?

    appleid.apple.com > click on the blue link under create an apple id "find out" I think it says. The enter your name and current/prior email addresses.
    try that

  • Everytime I plug my ipod into my computer, my songs keep copying themselves, and it's getting quite annyoing. I only had the iPod for 3 days. How do I prevent this from happening once more?

    I havetried to look for a solution to the problem but I couldn't find any. Help please?

    What does copying themselves mean?

Maybe you are looking for

  • Very slow boot due to USB controller?

    Hi all, I bought your barebone MS-6251 with combo DVD-RW. (other params are pentium IV 2.8 GHz, 512 MB RAM, 120 GB HDD Seagate, NVIDIA GeForce FX 5200 Ultra). I already installed your LiveUpdate software. I was absolutely satisfied with this product

  • Problem with music N73

    Hi all, every time I want to put music on my phone everything works excellent, I habe a card of 2gb but when I reach the 400 mb (452) and i have like 1300 mb free space I cant put anymore music on it.. if needed i will post some screens to show you t

  • Organizing Music. on my iPod

    On my computer I have all my music in Folders & SubFolders: Artist -Album 1964 -Album 1965 -Album 1966 After I go into the Folder(Artist) I can then go into any SubFolder(Album). Sounds simple enough and works really well on my computer. When I load

  • LR5 Smart Preview Portability Question : Can files be edited remotely?

    I understand how Smart Previews work. What I'm unsure of is...will we be able to edit these files remotely, separate from the host computer? For example, I'm an image editor and I live 500 miles away from the photographer that I work for. Can they (t

  • 3d PLOT DIRECTION

    How can i programically change the 3D graph direction that I want to view. I know how to view and adjust the projection, but what about the graph's direction meaning XY, XZ, YZ, and user defined... Thanks!