Very Quick Question

I have a line of text eg "abcdef". How do I access each individual letter - ie How do i point to just the "a" then move and point to just the "b" etc.
Many thanks

See
http://java.sun.com/j2se/1.4.1/docs/api/
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html
but since I'm in 'be nice' mode right now, I'll tell you straight away:
final String test1 = "abcdef";
final char[] test2 = test1.toCharArray();
for (int k = 0; k < test2.length; k++) {
    System.out.println("Character at position " + k + " in \"" + test1 + "\" is '" + test2[k] + "'.");
}

Similar Messages

  • LibraryService.connect - very quick question :-)

    I have a quick query on the LibraryService.connect method. If I have 10 threads calling this method one after the other (Basically using a synchronised wrapper method) will this method return a new Library session for each call OR is it possible that an existing session will be returned. If an existing session is returned and subsequently two threads try to perform a task simultaneouly on the same LibrarySession will this cause a problem?
    many thanks in advance
    Trev.

    a call to LibraryService.connect will always create a new LibrarySession
    the LibrarySession class is thread-safe, but certain operations are not synchronized, such as starting and ending transactions. if you have multiple threads using a single LibrarySession, you must ensure that your transaction management is synchronized, otherwise you may end up with transactions being committed out of order, which causes an error.
    here is some more info:
    BIN$$ Tables in target shema

  • [Solved] Very quick question, Accessing NTFS windows drive

    So I have Windows in my first harddrive (Bigger HD hold my music, games etc.)
    And Arch is installed to the second smaller HD, How would I make it so that the NTFS windows HD would be automounted and I have the ability to view all my files?
    Last edited by Lobstertorch (2009-11-04 03:03:44)

    ;_; that sucks. alright... I'm gonna give this a whirl. I'm assuming i'd
    sudo mkdir /win
    chmod a+rwx /win
    then add that above line to my /etc/fstab?
    Will I need a reboot?
    And what about the embedded spaces stuff? I plan on accesessing these files through a filemanager.
    Thanks for your patience, and I spaced this post weird like what the hell?
    EDIT: I did it :3. Thank you very much. At first when you posted I was kinda like uh oh. But I got it now. Always learning new things . Thanks.
    Last edited by Lobstertorch (2009-11-04 03:03:30)

  • Very quick question.... preview texts / missed call notifications

    I've had my Z3C for over a month now. If I am totally honest.. I wish I had stuck to the iphone. But never mind, i am pleased i have given it a try.
    Anyway... how do i turn on SMS previews? I've worked out how to get whatsapp message previews but I can't see sms previews.
    Also, can i see that I have received a text or missed call while on the locked screen? When I receive a text or missed call while i've been away from my handset for a short time I sometimes don't realise unless i unlock the screen.
    How do I change this? Thanks in advance

    Since you had an iPhone before, perhaps this is what you want/need
    you can download and app like this
    WidgetLocker
    https://market.android.com/details?id=com.teslacoilsw.widgetlocker&feature=search_result#?t=W251bGws.....
    ICS Lockscreen HD
    https://market.android.com/details?id=com.dj.golocker.theme.icecream&feature=search_result#?t=W251bG...
    https://market.android.com/details?id=dcombl.golocker.ics&feature=related_apps#?t=W251bGwsMSwxLDEwOS...
    Lucent Lock Screen
    https://play.google.com/store/apps/details?id=com.whitegorillamedia.lockscreen&feature=search_result....
    Extended Controls
    https://play.google.com/store/apps/details?id=com.extendedcontrols&feature=related_apps#?t=W251bGwsM.....
    iPhone notifications lite
    https://play.google.com/store/apps/details?id=com.nlucas.iphonenotificationslite&feature=search_resu...
    Notification Bubbles
    https://play.google.com/store/apps/details?id=com.commind.bubbles&feature=search_result#?t=W251bGwsM...
    NotifierPro Plus
    https://play.google.com/store/apps/details?id=com.nlucas.notificationtoaster&feature=more_from_devel...
    and it seems that handcent has a similar feature
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • A quick question about WebDynpro SLD and R/3 with concurrent users

    Hello ,
    I have a very quick question about Webdynpros and SLD connecting to an R/3 system, when you configure a webdynpro to connect to an R/3 system using SLD, you configure a user name and password from the R/3  for the SLD to use. What I would like to know is when I have concurrent users of my webdynpro, how can I know what one user did in R/3 and what another user did? Is there a way for the users of the web dynpro to use their R/3 credentials so SLD can access the R/3? Like dynamically configuring the SLD for each user?
    - I would like to avoid leaving their their passwords open in the code ( configuring two variable to get the users username and password and use these variables as JCO username and password )
    Thanks Ubergeeks,
    Guy

    Hi Guy
    You will have to use Single Sign On to achieve this. In the destination you have defined to connect to R/3 , there is an option to 'useSSO' instead of userid and password. This will ensure that calls to R/3 will be with the userid that has logged into WAS. You wont need to pass any passwords because  a login ticket is generated from WAS and passed on to R/3. The userid is derived from this ticket.
    For this to happen you will have to maintain a trust relation ship between R/3 and your WAS ,there is detailed documentation of this in help files. Configuration is very straight forward and is easy to perform
    Regards
    Pran

  • Quick question, where to put global variables

    Very quick question:
    where is the best place to put global variables,
    (e.g. a flag that turns on debug mode)
    if they are needed by the entire application?
    I'm guessing they should be placed in their own class.
    But should I make them public static final constants,
    and just do Globals.MYCONSTANT
    OR should i do "implements Globals" in all my other classes?
    The first way seems simpler and more logical,
    but in the examples for JSDT, they use the second technique.
    Any thoughts?
    thanks! =)

    I would suggest either creating a properties file for your globals, or adding them to the system properties at startup. Placing items like debugging tags in your code means that you have to change the code, recompile, and rejar before your change is implemented. Using system properties means that you simply have to change your command-line options (i.e., from -Dmyapp.debug=true to -Dmyapp.debug=false).
    Shaun

  • Quick question about SATA 2

    Hi,
    Very quick question,
    Are the newer SATA2 Hard Disks compatible with the older model of the Mac Pro? May sound stupid, but I believe that the Mac Pro was released before the SATA 2, so just wanted to check the Mac Pro hardware etc will take SATA 2.
    By older model of Mac Pro, I mean the one released before the newest available models (2 x 2.66Ghz Dual Core).
    Thanks!

    Hi 02drummersteve02;
    SATA 2 is backwards compatible with SATA 1. So you can install SATA 2 drives in a SATA 1 computer.
    Allan

  • Quick Question: MobileMe and Info Tab in iTunes

    Hi All
    I'm new to the iPhone, but use a Macbook and MobileMe.
    My very quick question is...
    Should I be using the settings on the phone to sync to MobileMe while leaving the iTunes Info Tab settings unselected?
    Hope that makes sense.
    Thanks in advance.

    Hi,
    You can no longer sync contacts with iTunes 11.1.4 with mavericks OS X
    http://support.apple.com/kb/PH12117
    Jim

  • Very Quick PF Input Question

    Hello.
    A quick question if I may. I am in diffs.
    What are/When to use the PF inputs?
    With regard to triggering data aquistiions, will wiring a +5V input to pfi0 work as a trigger?
    Thanks.

    Hello Brian. Thanks for the reply.
    I am using a 6071 card.
    PFI 0/AI START
    PFI 1/REF TRIG
    Perhaps I should be using the PFI 1 port?
    http://www.ni.com/pdf/products/us/4daqsc199-201_ETC_212-213.pdf
    Here is the link for the pdf of 6071
    Best Regards
    Thomas

  • Very quick Do while question!

    Hey guys,
    Quick question i somewhat forgot how to do the do while loop, heres what i think it looks like but it keeps giving me an error on the syntax.
    Any pointers would help please.
    do{
           //code goes here
    while(y>x);Where does the last { go?
    Thanks in advance!

    I said in front of the while, not after it.
    do
    {Ok thanks the syntax error went away but when i run the loop it just runs past the question why?
    do{
              if((side1+side2)>=side3)
                        System.out.println("The perimeter of the triangle is "+total);
              else
                   System.out.println("The input is invalid:");
                   System.out.println("The sum of side 1 and side 2 can't be greater than the third side!:");
                   System.out.println("Would you like to try again");
                   answer=scan.nextLine();
                   }while(answer.equalsIgnoreCase("y"));
    }It executes everything right except it doesn't let you enter an answer.

  • If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question

    If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question. Trying to hold out as long as I can, but purchasing an iPhone for Christmas and new iMac next year when warrently expires.

    Thank U very much for the quick reply, I wanted to upgrade this weekend, but still on the fence. I can live with the software that is not compatible, they are on another compuetr, just didn't want the obvious stuff to stop working.

  • 2 Quick Question

    Hello - I'm pretty new to Motion and have 2 quick questions:
    1) If you've got a bunch of keyframes on a timeline and want to make the entire sequence longer - is there a way to just pull the last frame out and have it automatically interpolate the keyframes in between so that it keeps the same timing and everything... it just makes the whole sequence take longer?
    2) On the same timeline with a bunch of keyframes, can you apply one long Interpolation (ala "Ease Out") to the entire thing from A-Z so that the whole sequence eases out rather than just keyframe to keyframe?
    Thanks!!
    Jason

    Heya,
    1. If you're asking if you have something like the "roving" keyframes in AE...well, kinda. Keyframes on footage, shapes, generators, particles, replicators—objects that create an image—don't seem to scale. But keyframes on secondary objects like behaviors and filters do scale.
    2. Very easy: go into the Keyframe Editor and click on the animation state icon/menu for the parameter you want to change. The icon/menu is the last column after the parameter's value in the left-hand side of the Keyframe Editor. If you pick an interpolation type in that menu, it applies it to all keyframes in that particular curve. It's also the same place where you can set the before/after extrapolation, like ping-pong, progressive, etc.

  • Quick Question: When to use ( ) and when to use [ ] and why the ( *)

    Hi all,
    A quick question that i'm sure is very simple but is slightly confusing me. I've just started trying to learn Objective-C and am a little confused by ( ) and [ ].
    I get that you use the [ ] brackets when you want something specific from an object, i.e.
    [ textField textColor ]
    and that you use ( ) brackets for things like:
    if ( x == y) {
    But I get confused when I see things like:
    NSLog(@"some text here");
    Why does that get ( ) brackets and why is it not [ ].
    Also another point of confusion, creating methods... Why are some methods done like:
    - (void)awakeFromNib
    And others done like (with the additional "*" added):
    - (NSString *)stringvalue
    As I said, I'm sure this is very simple and obvious, but it is confusing me slightly.
    Thanks in advance!

    Adam:
    As you already know, square brackets are used to send a message to an object, so if a object like myObject implements the method -doSomething, you can call it with:
    \[myObject doSomething\];
    The other use square for brackets have is to index C-style arrays, such as:
    aValue = anArray\[10\]; // Get the 10-element of an array
    However, because C-style arrays are rarely used in Cocoa applications (use NSArray instead) you will not see this situation often.
    Parenthesis in expressions are used to group and prioritize, such as:
    x = 10 * (3 + 5); // x = 80
    If () statements use it to delimit the test expression. Same with while (). for () uses it to enclose the limits and increment statements, etc.
    The other important use of parenthesis is in calling a C function:
    result = foo(3);
    means that you are calling the function named foo with the argument 3, and storing the the return value in the variable 'result'. This is different from a message because a C function is not a method of an object. They exist independently of any objects. NSLog() is a function defined within Cocoa but it is not a method. So, you call it with the traditional C function call syntax. Cocoa defines other functions like NSStringFromRect(), which takes an NSRect as argument and returns a pointer to an NSString.
    And that leads me to your last question. Some methods return simple types, like int, float, or void (i.e. returns no value). These methods will have prototypes like:
    \- \(void\)returnNothing;
    \- (int)returnInteger;
    Other methods return pointers to types, like:
    \- (int \*)returnPointerToInteger;
    \- (void \*)returnPointerToAnything; // In obj-C one typically uses id instead of void*
    Returning whole objects from methods has problems and it is better to just return a pointer (the address in memory) instead:
    \- (NSString *)makeAString;
    The method above returns a pointer to an NSString rather than the entire object.
    Good luck with your learning,
    Juan-Pablo
    Message was edited by: Juan Pablo Claude

  • Currently have 10.4 but want to install snow leopard....quick question!!!

    hey guys, i just have a quick question about my itunes
    i have my music arranged by date added, which is very important
    this is how i have it:
    what i want to know is: is there a way to install the new OS, and somehow keep the music in the order that it is right now?
    thanks a lot!!!! ----arthur

    You'll probably get more help at the iTunes forum.
    http://discussions.apple.com/forum.jspa?forumID=789

  • Quick Question (re:exporting from iMovie into iDVD)

    Hello everyone!
    I just have a quick question for you all... (I want to see if this is normal - I'm on a deadline and this is kind of freaking me out)
    So, we have a 20 minute or so video in iDVD. It plays fine, etc etc. The goal is to burn it to a DVD.
    I used the "Export -> to iDVD" function in iMovie, which launched iDVD.
    But here is the weird thing: nothing comes up in iDVD. It doesn't make a new file, doesn't give me anything... it is just open, waiting for me to create a new project to work with.
    YET, if I look in the Activity Monitor, I do see that EncoderServer (using 123% CPU) and ThumbnailServer (both iDVD processes) are running.... but shouldn't iDVD have told me it is working or that it is dealing with data?
    This is very un-"apple". I totally would have expected a progress bar of some sort in iDVD telling me it is working or something.... or is something wrong and I should try to export it in a different way?
    (I guess the underlying question is: when you export from iMovie to iDVD, does iDVD normally give you any 'heads-up' that it is working? how long does it normally take to open the project in iDVD?)

    Hi Matt!
    when you export from iMovie to iDVD, does iDVD normally give you any 'heads-up' that it is working? how long does it normally take to open the project in iDVD?)
    Yes, and it's instant.
    What you should see is iDVD opening and asking you to create a new project, It will suggest naming it the same as the iMovie project.
    There are reports that exporting from Imovie to iDVD can produce problems. What I do is save the iMovie project and close iMovie. Open iDVD, create the new DVD project, then go the File menu in iDVD, scroll down to Import, and in the side menu select Video. This open your Movie Folder, wherein resides your iMovie project. Select it and it imports into iDVD in a flash.
    Remember: iMovie projects go in the Movies Folder, iDVD projects go in the Documents folder. Change that, and they get very confused and unhappy.

Maybe you are looking for