Why should still we use String though we have StringBuffer?

I hope StringBuffer is best instead of String. Since StringBuffer grows itselfs when the content increases with out creating new object .
So now I have a question, Why should still we use String though we have StringBuffer? whether do you any proper reason or situation to go for String ?

I hope StringBuffer is best instead of String.StrngBuilder is better than StringBuffer in Java 5.0. Both are different from Strings.
Since
StringBuffer grows itselfs when the content increases
with out creating new object .Which is not necessarily a good thing. Strings can be relied upon not to change
So now I have a question, Why should still we use
String though we have StringBuffer? whether do you
any proper reason or situation to go for String ?One reason: you can't intern StringBuffers and thus save on instantiation effort and emory space. You can do that with Strings because they cannot be modified.

Similar Messages

  • Why should I continue using Mozilla when it fails to recognize legitimate web sites

    Why should'nt I use Windows Explorer as Mozilla refuses access ?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • Why is my history blank even though I have 'remember history' turned on in the preferences

    Why is my history blank even though I have 'remember history' turned on in the privacy tab in the preferences. I use a mini mac, Mac OS X 10.6 and Firefox 6.0.2

    Same problem here. I have Firefox on several machines and OS (XP and Ubuntu [edit: Win 7 too]). However, the bookmarks file is the same in each.
    None of the location bars suggest (autocomplete) features work now. I tried deleting the places.sqlite (bookmarks) file and the bar began working again, but all my bookmarks had lost their "[http://en.wikipedia.org/wiki/Favicon favicons]". When I replaced that places.sqlite file with my original (including the favicons) the location bar again ceased working.
    I highly doubt that the upgrade to 3.6.11 would corrupt every places.sqlite file I have on multiple computers. That leads me to believe that there is some kind of bug in 3.6.11 that messes up the location bar (especially if your bookmarks contain favicons). Hope some kind of patch can be found.
    Edit: Just updated Firefox on Windows 7 with same results. I even backed up the places.sqlite (so it could not be corrupted) file before updating then used the backup file when the location bar failed to work. Even restoring with the backup file didn't work - again, this can not be due to a corruption issue.
    Finally, I noticed that one (only one) of the autocomplete bookmarks I had selected prior to updating FF in Ubuntu was actually retained. Is there some other file where autocomplete data is held? I wish I knew why that one bookmark is still able autocomplete while all the others will not (note: this is only in the Ubuntu install all other FF installs (in XP/Win7) bookmarks will not autocomplete.

  • Ok so my i need help with my iphone 4s... i have about $5.00 of credits left of the itunes card i got and i decided to get a show and it says i need to verify my credit card, why doesnt it just use the credits i have? its under 5 bucks? help me please

    ok so my i need help with my iphone 4s... i have about $5.00 of credits left of the itunes card i got and i decided to get a show and it says i need to verify my credit card, why doesnt it just use the credits i have? its under 5 bucks? help me please

    You have to do it here for help
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Why should i write main(String[] args)?

    Hello,
    I don't know why i am obliged in the main function of the class to send an array of string as parameters?
    Thanks

    Actually I think this is a great question!
    main()
    Any java application has to have a main method to do anything, but as you gain further into java and object orientated practices you will start writing lots of stuff that do NOT have a main method but are *.java and *.class files, neither will they do anything unless they are attached to a program with a main. Andthen as you get DEEPER still you might even have 'private synchronised void main(String[] args)' - though not too often.
    Why an array of strings? Hmmm ...pauses ...thinks, there is no obvious reason, other than the fact that if you're going to pass parameters from 'java ...' command line to the application. This is, logically, the most potentially useful data type to have. There may well be other reasons for this, so the answer to the second part of your question is a logical deduction - it may not be right.

  • Audio Space Still Being Used even though Match is turned on

    My iphone is showing 20.9 GB of audio data even though iTunes Match is turned on.  There is no way to adjust what music is on my phone in the music tab in iTunes.  My understanding is that my music will now be stored in the cloud and not on my phone.  That should free up a lot of space for videos and pics.  Am I missing something?  Why is my music still in my phone?

    Ok I tried turning off Match on my iPhone the syncing with iTunes and I unclicked all my music and after syncing and rebooting my phone I went from 20GB to 12GB of audio files.  I still have music in my phone that's not selected in iTunes and on top of that I still have access to some music in iCloud. 
    I for one am sick and tired of Apple releasing bug filled software and hardware.  Next thing that comes out I'm passing on for at least a month. 
    Now trying turning off syncing music entirely and see if that takes it off my phone.  I feel like this whole iCloud business is about 20 steps backwards.  I had everything working perfectly between 3 macs a PC 2 iPhones and 2 Apple TV's and now nothing works right.  I'm sorry but iCloud *****!!!

  • Why should I NOT use Finder to remove old TM backups?

    I have a new Macbook Pro running Mavericks, and my old Macbook was backed up to an external hard drive using Time Machine.
    I want to create some space on the external drive, but I don't want to delete all of my prior backups, in case I find out later that something I migrated to the new machine is corrupted or broken.  I understand you can delete old backups using either TM or Finder (or Terminal, but I don't feel comfortable with that), but many posts I've read warn against deleting old backups using Finder; is this a bad idea, and if so, why?
    Also, I know that TM creates hard links to files that are in previous backups, rather than actually making multiple copies of the same folder. Are the actual files stored in the backups.backupdb folder, or in a different location?
    Thanks!

    Time machine is an incremental backup - if you back up everything you can restore your hard drive to a point in the past - hourly - last 24 hours - end of day - last month - end of week until Time machine starts consolidating for room.
    Time machine does an initial full backup - all other backups are files that changed only. You will get large backups if you rebuild IPHOTO library as that entire library will be backed up rather than only that which changed.
    Cleanup is the point where daily is merged into weekly (most recent in the time frame is kept) and hourly is merged into a daily so you may see GB used on your time machine drive decrease or fluctuate around a point for a period of time.
    Also means you can restore folder, items, and at least in snow leopard - if you want one IPHOTO picture - simple open IPHOTO - then go into time machine and you can get it.
    In Yosemite - time machine if active will keep missed backups on your hard drive until you connect the TM drive (that is new for lap tops I guess)
    Desktop I keep time machine connected and the hourly backups and cleanups don't cause any problems.
    If a file does not change there may be only one backup on the TM drive.
    If you want to keep a backup of something you downloaded - but want to delete it off your hard drive - back it up to a separate device - as time machine will eventually remove it from TM.
    If you want to delete something on time machine that you no longer want user enter time machine - does prompt you if you want to remove all instances of the item.    Doing it that way will keep the chain clean.

  • Why should I stop using Pagemaker

    I have been using Pagemaket 7 for many years, what benefits would justify an upgrade to Indesign considering costs & learning process!

    The capabilities of Indesign make pagemaker seem like a toy.
    I'm not sure how fancy your forms are, so the graphics handling may not be important.
    Graphics handling is much better with support for transparencies, built in gradients, drop shadows, bevels  etc. Much improved support for placed pdfs. Real color mangement, Separation panels, great for spot colors, etc.
    For text I would think you could use things like character styles, better paragraph rules, page based baseline grids, nested styles and most importantly Native support of tables.
    Although I haven't used it there is in CS6 added support for interactive forms.
    I'm sure there are many other things that would help in forms that I have missed.
    There will be a bit of adjustment, some people have a harder time than others. After a short time you wouldn't even think of going back to pagemaker.
    Jay

  • Why should I ever use iBooks to purchase books for iPhone again?

    I have purchased books from my iPad and opened them in iBooks. I now cannot transfer/sync them with my iPhone or iMac. Mac products have always been supportive of their users. However, this is a slap in the face of loyal users (me, since 1988)
    Doesn't anyone know of a way to transfer iBooks content from iPad to my iPhone? ( I noticed that Apple has been conspicuously absent in resolving this issue for years— much the same way as it handled the iMovie fiasco in 2010.)

    Bob McAdams wrote:
    I purchased a document in pdf format;
    Where?  Apple's iBookstore does not accept/sell .pdf format, only .epub and .ibooks.  So you presumably got it somewhere else and might be able to go there to get another copy for your phone.   What is the title?

  • I am trying to setup a new Apple ID but it tells me the email address I want to us is in use even though I have deleted it as the secondary address for mother id

    I Am trying to set up a new AppleID but it tells me the email address I wish to use as the ID is in use.  It was the rescue address for another account but I have deleted that.  What do I need to do to get it to recognise the email address as a new one. I cannot set up iCloud without an ID

    Email addresses can only ever be used once in an Apple ID. They cannot be deleted from one Apple ID and moved to another.

  • Why should i use Ipod

    Hey guys,
    i want to know why should i want use ipod .. i am having a Philips Mp3 Player .. Whats the Difference between an ordinary mp3 player and ipod .. If the Question looks like silly am sorry .. i want to knowthe salient features of ipod comparing to other Mp3 players!

    The iPod has what some people call an "ecosystem." That means there are a lot of companies creating and selling thousands of accessories that work with iPods. It means that car companies are building iPod connectivity into cars. It means the iPod becomes more than an "ordinary MP3 player," and such accessories and options are not available for players that are not iPods.
    You also have iTunes. The iTunes software (even without the Store) is the best program for managing and playing your digital music collection on your computer (Mac or PC), and integrates using an iPod as part of the experience. If you choose to use the optional Store, you can buy media to play on the computer or on your iPod, from the world largest and most diverse collection (including free downloads and podcasts).
    All iPod's except for the shuffle can now play video. I don't know if your "Philips Mp3 Player" is a +media player+ or just an MP3 Player. The best iPod is obviously the iPod touch; it's basically a tiny touch-controlled computer with WiFi and a browser. Doing a comparison between the iPod touch and an MP3 Player would be like comparing a typewriter to a computer.
    If you are happy with your player and what it does, an iPod probably won't do those things any better. It's the combination of iPod, iTunes, and third-party accessories/options that makes using an iPod "better."

  • Question why has my balance on my itune account have totally disappeared when I have only been using it for less than a year? had still fair bit of money in it too. around $60

    Question why has my balance on my itune account have totally disappeared when I have only been using it for less than a year? had still fair bit of money in it too. around $60

    First, make sure you're logged into the iTunes Store using the account ID and password you set up, or used, when you redeemed your card/gift.  If you are, try signing out of the account and back in.
    If you're sure you are using the correct account and that you're signing in to the iTunes Store, and signing out and back in doesn't help, go to the Purchase History and review your purchases to make sure that you should indeed have a balance left. iTunes doesn't always refresh the balance it shows, so it's possible you spent the money and it just wasn't being reflected in the display. This display error can usually be corrected by logging out of the iTunes Store and then back in.
    If you confirm that you should have balance left but the iTunes Store isn't showing it correctly, send a message to the iTunes Store customer service department through the contact form you'll find by selecting the most applicable section of their Support page (select the Contact Support link and follow the instructions) and explain the problem to them.
    Good luck.

  • Why should i use Apple 'Mail' if i use others like G-Mail?

    Simply:  Can or should i just remove 'A-Mail' so it's icon stops jumping & bothering me to sign up? 
    •THANK YOU, and gratitude to whoever can help me unerstan.
    *I'm 67 and not up to speed on such things.
    BACKGROUND, if necessary:
    •For years I've used only the Mail service of my ISP, Dslextreme ('DSLX').
    I've never used Apple 'Mail' , & never set it up to service mail from any of the mail services that i do use.
    I never activated 'A-Mail'  and i don't think there is mail in it.  Nor have i deactivated 'A-Mail', and it's still on my screen in the 'Dock'.
    •But from time to time, and inexplicably to me,  the 'A-Mail' icon seems prompted to start 'jumping' and wanting me to use it somehow, like sign up for it.  This was a minor annoyance so i just clicked to close it and so ignored it and moved on.
    This seems to happen when a website i'm on wants me to e-mail them and on their page i seem only have a choice to use 'A-Mail', none other, so i am pre-cluded from communication.
    •Just recently DSLextreme switched all us users over to G-Mail.   They turned over their mail operation to GMail and urged us to also getting a G-Account, which i have finally done.
    •I know that A-Mail 'works with the most popular email systems' like G-Mail.
    •"A-Mail"  = Apple's 'MAIL'.   To avoid confusion caused by the generic word 'Mail',  I'm going to call Apple's 'Mail' "A-Mail".
    I've spent over an hour trying to make my problem clear to you.    I hope i have succeeded.

    Apple mail is simply the default email application in OS X. It is not an email service/email address.
    Using an email application, you can read all your email in the same place and store them on your local drive.
    To answer your question, "Why should i use Apple 'Mail' if i use others like G-Mail?"
    You use a mail application for the same reason you use the internet when you could simply drive to the store to buy things or go get a newspaper or go to the library or go to the movie theater, etc.
    But from time to time, and inexplicably to me,  the 'A-Mail' icon seems prompted to start 'jumping' and wanting me to use it somehow, like sign up for it.  This was a minor annoyance so i just clicked to close it and so ignored it and moved on.
    This seems to happen when a website i'm on wants me to e-mail them and on their page i seem only have a choice to use 'A-Mail', none other, so i am pre-cluded from communication
    because the website is attempting to open your email application.
    Sounds like you simply use a web browser to view all your email.
    If you want to send an email from a web page, you need to copy an email address,  open your email account in your web browser, create a new email and paste the address.

  • Diagnostics: Why should I use it?

    Hi everyone,
    I got some questions regarding SAP Solution Manager RCA / Diagnostics;
    -  Why should I use it, what are the benefits and how is this related to (getting) SAP Support.
    - Is it a prerequisite? ( for Support or any scenario( EEM, Project, EWA's ) )
    - Can I use HP Diagnostics instead? Get I still support?
    - Which scenarios can't I use now or in the future ( SolMan 7.1 )?
    Thanx
    Meindert

    Hello Meindert
    It's recommended to at least set it up for Java based SAP systems.
    It gives more information to find the root cause of crashes, without it, java based SAP systems do not always offers sufficient information or you would have to use other third party tools to analyze the crash situation.
    I find it to be very useful, of course you have to know how to use, when to use what and so on but you can find user guides on service marketplace [http://service.sap.com/diagnostics].
    It also offers additional tools to be used such as Configuration Validation which can be used to check the configuration of multiple SAP systems against a template (or predefined templates). Configuration validation can be used to check that your landscapes are in sync (kernel, patch levels, parameters and so on). Prerequisite is E2E Change Analysis (which needs to diagnostics agents to work).
    I would even recommend to install it for at least each productive SAP system you have (regardless if it's java based or not).
    I do know it's a lot of additional work, installation of the agent itself is fast, making sure everything works properly is another story (I schedule a day work to perform installation, configuration and check all functionality for one such agent).
    Kind regards
    Tom
    Edited by: Tom Cenens on Dec 7, 2010 6:10 AM

  • Why does my mac use virtual memory when I still have free physical memory?

    I have a 2011 i7 quad core mac, I was hoping it would scream. Most of the time it does. However when trying to edit within FCPX I get a very disappointing experience with many pauses and pin wheels if I don't close every single other program.
    I have 8GB of physical memory and when i'm experiencing these problems I see that i still have 1-2 gb of physical memory free or inactive. At the same time FCPX is only using 2gb of memory. I just happened to keep an eye on the VM page in/outs and noticed them going up.
    Right now i'm doing some browsing and emailing, that's about it.. its sat with over 4gb of memory free or inactive and yet still the page in/outs is still going up occasionally. It's currently at over 2 million page ins, and over 1 million page outs.
    So with so much physical memory free why is this happening!? At the moment the mac feels nice and responsive, but if i start trying to use FCPX i'll start to experience these slowdowns, stalls... whenever i see these i see my main hdd is being accessed whilst the pinwheel is displayed.. I mean i get it, its VM, the hdd is too full, a bit fragmented perhaps, its stalling... but i've got gigs of memory sitting free or inactive... why wont the OS use it!!!
    Would my experience improve if i took the plunge and got 16gb of memory instead of 8gb!?
    Thanks for your help!

    Because without virtual memory, managing computer RAM is a royal pain in the ...
    Virtual memory cost you nothing, and gains you huge benefits, even if you do not notice it
    What cost you is when you need more real RAM than is available, and things are thown out of RAM, either back to the original file it came from (Read Only information), or pushed out to the swapfiles (/var/vm/*).  Then the system has to wait for slower disk access.  But even this is better than not being able to run the apps until you quit something else.
    (speaking as someone that starting his professional life working with 1" punch paper tape, 80 columns cards, 7-track and 9-track mag tapes, 1MB disks (you heard me right 1 Megabyte), etc..., and trust me when I tell you that virtual memory is a god send to software development).
    There are a lot of problems running a modern operating system with out virtual memory.  For example all the shared libraries and frameworks that provide services to an application would all need to be compiled into the application, which means every application gets bigger and instead of having a single copy of the shared library or framework, you would have dozens of copies wasting your RAM.
    Without virtual memory, you would be required to find a contiguous chunk of RAM to run your application.  Think of this like going out to dinner by yourself, you can find any available table, but if you go to dinner with your extended family, you need a table for 10 to 15, and if you are going to dinner with your high school graduation class, you will need hundreds of seats all next to each other and a very large table.  In the later situations you have to wait until the resturante has enough contiguous space, which means you have to wait until other diners finish.  There may be lots of empty tables, but they are not together, and your group wants/needs to sit together.  Virtual memory allows gathering any 4K chunk of RAM, building a virtual memory map for all those random 4K chunks, and make it look like one big contiguous chunk of RAM, so you can run your application right away, no waiting.
    Going back to shared libraries and frameworks.  This code will need to have addresses resolved so they branch to the correct locations during execution, and it will need to have addresses resolved on where its program variables are located in RAM.  Using virtual memory, you can local a shared object into RAM, then place it in everyone's virtual memory map at the exact same RAM address.  This means everyone can use the exact same code, and since everyone is using it at the same RAM address, it makes life so much easier for the operating system (translation, less work, less wasted CPU time, faster execution).
    When a program wants to grow, for example a web browser loading a web page (and its images) into RAM, it needs to allocate additional RAM.  In the contiguous RAM model, you need to get control of the RAM that imediately following your program, but if that RAM is being used by someone else, you have to wait until that program goes away.
    Virtual memory provides protection from another program looking at and modifying your program's RAM.  Malware would just love for virtual memory to go away.
    You want virtual memory.  What you do not want is excessive paging activity.
    If you are concerned, then you can launch Applicaitons -> Utilities -> Terminal.  Once you have a terminal command prompt, enter the following command:
    sar -g 60 100
    which will tell you the number of 4k pages written to /var/vm/pagefile ever minute for 100 minutes (modify the numbers to suit your tastes).  You can then go about your normal usage, and come back later to see how much you have been using the pagefiles.  If you have mostly zeros, and an occasional small burst, this is noise, and not worth worrying about.  If you have sustained pageout activity, with higher numbers, then you should either consider running less things all at the same time, or looking for an application that is being greedy with its memory use (or has a memory leak), OR get more RAM for your Mac if you need to do all those things at once.
    But do not complain about virtual memory.  Life would be much worse without it.  Then again if you have a better idea, write a research paper, and get operating system vendors (as well as hardware vendors) to implement your ideas.  I am serious, as I've seen many accepted computing ideas be overturned by good new ideas.

Maybe you are looking for

  • Input Filed Length Changes in SAP Table How to maintain in WDJ

    hi , i have scenario where we are having the scenario like dat .. container id with 10 chars previousl y in sap system currently from sap they have changed the length to 20 char in sap tablle. from web dynpro java we have set length 20 char . scenari

  • 64 bit Flash beta - where?

    I have read about a beta version of a 64 bit Flash driver, yet when I attempt to access it to download, I just get into a loop of moving back and forth between various webpages when clicking on the links to the beta download. Has the file been remove

  • How do i transfer my contacts from a samsung galaxy to an iphone 4s

    Hi My wife has just got an iphone 4s and wants to transfer her contacts from her old Samsung Galaxy to her new 4s. Is there an easy way to do it? Regards Matt

  • Move Tool problem (i think)

    When selecting an object and you want to move it, say 10mm up and 10mm down, how come on CS5.1 to move the object up, it needs to be a minus i.e -10mm to go up!!! Previous versions have been "normal". Any idea's anyone. PS Hello, im new to this forum

  • 0IC_C03 Inventory Control Data Issue

    Dear Gurus, We have implemented BI 7.0 with the latest support package as of 1st May 2011. Issues are coming relavent to 0IC_C03 infocube for inventory control. I have followed the how to guideline but issues are there. I have done the following sett