How many string tokens do I have?

String line = "00:05,  4 May 2007;
StringTokenizer st = new StringTokenizer(line);Four or five?
I am not sure whether ":" or "," is a default delimiter?
Thanks

http://java.sun.com/javase/6/docs/api/java/util/StringTokenizer.html#countTokens()
Also, "StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code."
~

Similar Messages

  • How many string objects - please suggest

    Hi there,
    Can you somebody please tell how many String objects will be created when the following method is invoked?
    public String makinStrings() {
    String s = “Fred”;
    s = s + “47”;
    s = s.substring(2, 5);
    s = s.toUpperCase();
    return s.toString();
    Thanks
    Shan

    Hi VShan,
    This is your code
    public String makinStrings() {
    String s = “Fred”;     //1
    s = s + “47”;            //2
    s = s.substring(2, 5);//3
    s = s.toUpperCase(); //4
    return s.toString();     //5
    EXPLANATION : String is an immutable object, that means the String object cannot change it's contents.It might sound very unfamiliar but it is TRUE. In line 1: You declare a String object by assigning a a String literal "Fred" to the variable s. Now when you concat "47" with the original contents of s , a new memory space is allocated where s is assigned.+It is important to note+ that the previous reference of s i.e. "Fred" will be lost and now s refers to a new memory location where the contents are "Fred47" , so you have created another object in Line 2. Similarly you create another object in line3 & 4.As far my calculations you have created 4 objects.
    I would like you to kindly note that s is already a String so you can directly return s and hence there is no need of s.toString() in Line 5.You should also note that each object is also an eligible candidate for Grabage Collection.
    So as soon as Line2 gets executed , the object in Line1 becomes eligible for garbage collection.. that means when GC runs that object will be reclaimed and hence memory will be freed.

  • How many key fields can we have in a DSO?

    Hi,
    how many key fields can we have in a DSO.is it 16 or any number of key fields can be used? If only 16 are allowed pls let me know how to add more key fileds (my requirement is 21 keyfields) .
    Thanks in advance,
    Praveen

    Hi,
    Thanks for the reply. Pls let me know the procedure to include 5 more key fields because i have 21 keyfields which i have to use.
    Thanks&Regards
    Praveen

  • I'm a school tech coordinator. Many computers and many iPads. How many Apple IDs can I have per device, and how many devices can have the same Apple ID? To make my life easier, I'd like 200 devices to all use the same Apple ID.

    I'm a school tech coordinator. I have many computers and many iPads. I apologize if there is a some place that has all the rules governing the use of Apple IDs. I looked, and I even tried to get the answers from multiple Apple rep's. I couldn't find the answers.
    How many Apple IDs can I have per device?
    I want to use the same computer to sync and backup many iOS devices. The iOS devices would be associated with different Apple IDs.
    I may load apps under a school Apple ID and have users load their own apps under thier own ID.
    How many devices can have the same Apple ID?
    Can I use the same Apple ID on all the computers in a lab?
    Can I use the same Apple ID on all iPads for a particular grade level?
    Are the rules different for iOS devices and computers?
    I know that there are limits on "authorize" and "de-authorize" and how frequently those things can be done.
    Recently I heard that for the life of an iOS device, it can only be associated with five Apple IDs. That is not good for a school giving iPads to students in a 1:1
    To make my life easier, I'd like 200 devices to all use the same Apple ID.

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html
    It would be best to address your questions there, especially since this is a public forum, and over there you could post more private issues with this set-up. Not to mention, getting more official answers.

  • How many motions tweens can you have on a timeline?

    I'm a college student in Seattle.  We just had our mid-terms in Flash CS5.  One of the really simple questions was "How many motion tweens can you have on a timeline."  Yup.  The answer is one...... or is it?  I had a long discussion with my tutor (who is the greatest tutor in the world) and he wanted to think about it. I said to him that I thought that one motion tween was wrong because you can click on an object in the timeline, make it a motion tween, and double click it and make several motion tweens.  So, essentially, you can have more than one motion tween on a timeline.  Is anyone able to advise me because this is all about grades!

    You can have quite a few motion tweens on a timeline.  You can even have them happening simultaneously (I don't know of a specific limit), as long as they are all on their own layers.  Though the more you add simultaneously the more they can weigh down the speed of things running.
    If you need to prove this to someone, the easiest way is to create it and demonstrate it.  But you may want to check the exact wording of the question... it would not be beyond an examiner to throw a trick question in.

  • How many ADFS farms can you have in a single forest/single domain?

    Hi
    I may have some terminology incorrect...please let me know if I do. :)
    My question is, how many ADFS farms can you have in a single forest/single domain? If you want to know why I am asking...please read on.
    We have 1 ADFS Farm and we are looking adding services to it. However not every cloud vendor provides a "Identity Broker" with there services.
    We have a consultant that is advising that we need to enable a SAML-based IdP-initiated single sign-on (SSO) ie using "IdpInitiatedSignOnPage"
    However to do this we need to modify the ADFS website to have "drop down" list so the user can select the "Relying Party" and then authentication with them.
    This means we are exposing a list of every company/party we have federated with. The exposure of this information, is deemed a security concern by our company....which I agree with.
    So the consultant advises that we need a separate ADFS farm. I have searched online, but haven't found any information that confirms multiple ADFS farms can be implemented in a single forest/single domain.
    Thanks for reading and if you have any other suggestions...I'd appreciate it.
    Nyobi

    This is not exactly FIM related question - there is ADFS forum available on Technet. However - technically there is no limit of ADFS farms in a forest \ domain. It is just a service which uses AD and is not altering it in any way or storing some forest-wide
    information like Exchange. So you can setup two ADFS services in single forest - no problem. 
    If it is a best solution to your problem? I can't say with that limited information but maybe just customization of pages on ADFS side would be enough? 
    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl

  • "a"+"b"+"c", how many String objects created?

    Hello everyone,
    String s = "a" + "b" +"c";
    How many String objects are created?
    I guess 5, is it right?
    regards

    > How many String objects are created?
    >
    I guess 5, is it right?
    Nope. Just one.

  • How many more months do I have on my 2 yr contract?

    How many more months do I have on my 2 yr contract?

    You can dial #UPG (#874) on your handset to hear/receive a text that tells you when you can upgrade, which is likely to be the end of your current contract, although some things may have happened that would change it so the upgrade date and contract end date are not the same.
    Or you can log on to your account at VerizonWireless.com, and if you are the account owner, you can see the contract end date for your line or all the lines (if a shared account)

  • How do I find out how many of my Podcast's have been downloaded.

    How do I find out how many of my Podcast's have been downloaded.

    Here's Apple's official identification guide:
    http://support.apple.com/kb/HT1353

  • How Many Application Module should I have ?

    Hi All,
    Could you please share your experience...
    I am developing a ADF Faces + BC application, how can I determine how many application module should I have ?
    I have modules , i.e :
    Sales
    AR
    Inventory
    Purchasing
    GL
    Can I say that I should have 5 application modules ? ( one for each module ? )
    Thank you for your info,
    xtanto

    Its difficult to know if 80 is too much or jus right...The danger is that if you have many application modules, and for example a particular UI page requires you to manipluate data in many application modules then this has potential to be "overkill"...each AM requires a check out from the AM pool and database connection etc. etc. etc.
    If you need to manipulate many app modules on a single UI page if you were to nest these application modules then this might be more reaslistic...However, if a couple of UI pages requires manipulation of only one app module this sounds reasonable...
    I dont know if that really helps you
    So if on pages A, B and C you maintain Sales Order (which is one app module) then thats ok.
    If in pages X, Y and Z you manipulate Quotation (which is one app module) that would be ok as well.
    If the use case is that in page F, G and H you maintain Sales and on page J you maintain Quotation then you might want to nest one inside the other.
    If your use case is on screen K, L M, N, O, P and Q you access 4-5 different app modules then that would raise a concern with me...
    Again, don't know if that helps,,,
    One way of lookin at this is to create your VOs based on the way you want in the information to appear on your pages and from those pages think about the "uses case" and create your app modules based on those use cases...
    Does that help?
    regards
    Grant

  • How many mail acct can i have on the cloud

    Hi, How many mail accts. can I have on the cloud, also how I do I change my email acct on the cloud?

    Welcome to the Apple Community.
    You can have 1 main account (your ID) and you can't change it. You can have up to 3 aliases.

  • How many Story Lines may I have ?

    Hello everyone!!!
    So, I'm a musician and I wanna make music videos to youtube (just like thousands of other people do)...
    Wanna make my videos with FCP X...
    I saw some videos (tutorials) on youtube about tips and tricks on FCPX... Problem is that at any video (tutorial) I watch there's only a main story line...
    On some videos I may see the main story line and a secondary track above...
    Once I saw a tutorial that I can transform the secondary line into a story line - and then it will act just like my main story line.
    What I want to point out is that as a musician and making a music video, I would need maybe 6~9 story lines (for all instruments and stuff)... Because spliting the videos and sycing them over and over again would be annoying... It would be a lot easier if I could just have how many story lines I want, have them all sync and then just split the videos...
    (Hope I was clear enough, english is not my main language, sorry for that)
    So, to simplify, my question is: How many story lines can I have in FCPX ? (at least 2 I know I can have 'cuz I've already seen this on tutorials, wanna know if it is possible to have more than 2 or if 2 is the limit)
    Thanks already everbody!!

    Salivan, you can have as many storylines as you like.
    What you need to do is place your first or main instrument I the primary storyline. Add your second instrument as a connected clip, and turn that into a storyline by selecting it, right click & select create storyline.
    Now there is no reason why you can't add another connected clip above the secondary storyline, and place that clip or clips into another storyline.... and so on

  • How many message filters do you have ?

    I don't know if that question has been asked before?
    How many message filters do you have set up on your Ironport?
    Thanks
    Arnaud

    Hi "Community", (or are we still a "Nation"?) :-)
    Since one of the "conflating responses" was mine, I like to complete my answer:
    Besides the content filters mentioned in my first post, we have 3 message filters.
    Two are quite simple X-header adding filters (to indicate a message is actually received from the internet and an other to give insight into the SRB scores), The last one is some more sophisticated, it detects messages that need to be forwarded to our internal policy systems, regardless of the used destination domain.
    Steven.

  • How many primary keys can w have in cube, ods objects?

    how many primary keys can w have in cube, ods objects?

    Hi Naresh,
    16 primary keys only possible(for cube: 16 dimensions, ODS - Keyfields)
    For ODS:
    -         You can create a maximum of 16 key fields (if you have more key fields, you can combine fields using a routine for a key field (concatenate).)
    -         You can create a maximum of 749 fields
    -         You can use 1962 bytes (minus 44 bytes for the change log)
    -         You cannot include key figures as key fields
    More info: [Creating ODS Objects|http://help.sap.com/saphelp_nw04/helpdata/EN/4a/e71f39488fee0ce10000000a114084/content.htm]
    Hope it Helps
    Srini
    [Dont forget to close the call by assigning poings.... - Food for Points: Make a Difference through Community Contribution!|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]

  • How many passwords does my iMac have? running Lion 10.7.5 .

    How many passwords does my iMac have? Running Lion 10.7.5.

    For access to your Mac? Just the administrator password.
    Open System Preferences > Users & Groups then select the Password tab.

Maybe you are looking for

  • Editing photo results in error

    Hi, I'm using iPhoto 8.1.2 (424) on a Macbook Aluminum first gen. The last few days I've had trouble editing photos in iPhoto which I cannot fix with a restart or even a reboot. The problem is every time I edit a photo and click done the photo size g

  • Binding String Variables Into BOR Methods

    I have a function module that prompts the user for, among other things, free form comments which are appended to an overall comment log.  The comments are exported out of the fm as a string variable.  The plan is to carry the string along in the work

  • Two Internal tables to be displayed as separate ALV grid.

    Hi Friends, I have 2 internal tables say i_tab1 and i_tab2. I_TAB1 contains 10 records. I_TAB2 contains 15 records. My requirement is to display I_TAB1 with title 'Success Records' and ITAB2 with title 'Missed Records'. It should be done thro ALV gri

  • How to copy instal files on cd to a usb?

    hello I bought photoshop cs4 and I want to install it on my new Imac. The Imac doesn't have a cd/dvd drive. Is there a way to copy the cd files from the cd to a usb, or to download the photoshop somewhere.

  • Xperia M4 Dual auto SIM selection for hands-free calls

    When using my hands-free kit in my car to dial a number, I have to select which SIM I want to use from the phone screen, which is dangerous and not really hands-free. How could I configure the phone so it dials from the same SIM when I'm using a Blue