Difference between str="Hai"; and str = new String("Hai");

HI,
String szFirst = "Hello World":
String szSecond = new String("Hello World");What is the difference between the two types of string initialization?

RajivGuna wrote:
HI,
String szFirst = "Hello World":
String szSecond = new String("Hello World");What is the difference between the two types of string initialization?What do you think the difference is?

Similar Messages

  • Macbook changes,paying the difference between the old and the new

    I am from Brazil,and I am going to Orlando. I have an old macbook and I would like to change the old macbook to a new one. I want to give my old and pay the difference between the old for the new.Could I do this,if yes,How it happens?
    Thank you

    it doesnt work that way.  Apple does not accept trades.  But they may give you a gift card: https://www.apple.com/recycling/gift-card/

  • How do I tell the difference between iPad 2 and the New iPad because they both look the same?

    The box says iPad. How do I tell that I bought iPad or the new iPad? There is no way to tell the cpu is the new one or the camera is better when this is my first apple product.I have nothing to compare with.

    Here's the various iPad model numbers and order numbers. The model numbers are on the back of the iPad
    Apple iPad Wi-Fi (Original) 16, 32, 64 GB
    The wi-fi only iPad configurations are assigned model number A1219.
    MB292LL/A is the order number for the 16 GB configuration. The 32 GB configuration is assigned MB293LL/A and the 64 GB configuration is assigned MB294LL/A.
    Apple iPad Wi-Fi/3G/GPS (Original) 16, 32, 64 GB
    The Wi-Fi/3G/A-GPS iPad configurations are assigned model number A1337.
    MC349LL/A is the order number for the 16 GB configuration. The 32 GB configuration is assigned MC496LL/A and the 64 GB configuration is assigned MC497LL/A.
    Apple iPad 2 (Wi-Fi Only) 16, 32, 64 GB
    The wi-fi only iPad 2 configurations are assigned model number A1395.
    MC769LL/A is the original order number for the 16 GB configuration in black. The 32 GB configuration in black is assigned MC770LL/A and the 64 GB configuration in black is assigned MC916LL/A. The original 16 GB, 32 GB and 64 GB configurations in white are assigned MC979LL/A, MC980LL/A, and MC981LL/A, respectively. On March 7, 2012, Apple discontinued the 32 GB and 64 GB configurations and assigned new order numbers of MC954LL/A and MC989LL/A for the black and white 16 GB configurations, respectively.
    Apple iPad 2 (Wi-Fi/GSM/GPS AT&T) 16, 32, 64 GB
    The Wi-Fi/GSM/GPS iPad 2 configurations are assigned model number A1396.
    MC773LL/A is the original order number for the 16 GB configuration in black. The 32 GB configuration in black is assigned MC774LL/A and the 64 GB configuration in black is assigned MC775LL/A. The original 16 GB, 32 GB and 64 GB configurations in white are assigned MC982LL/A, MC983LL/A, and MC984LL/A, respectively. On March 7, 2012, Apple discontinued the 32 GB and 64 GB configurations and assigned new order numbers of MC957LL/A and MC992LL/A for the black and white 16 GB configurations, respectively.
    Apple iPad 2 (Wi-Fi/CDMA/GPS Verizon) 16, 32, 64 GB
    The Wi-Fi/CDMA/GPS iPad 2 configurations are assigned model number A1397.
    MC755LL/A is the original order number for the 16 GB configuration in black. The 32 GB configuration in black is assigned MC763LL/A and the 64 GB configuration in black is assigned MC764LL/A. The original 16 GB, 32 GB and 64 GB configurations in white are assigned MC985LL/A, MC986LL/A, and MC987LL/A, respectively. On March 7, 2012, Apple discontinued the 32 GB and 64 GB configurations and assigned new order numbers of MC755LL/A and MC985LL/A for the black and white 16 GB configurations, respectively.
    Apple iPad 3rd Gen (Wi-Fi Only) 16, 32, 64 GB
    The Wi-Fi Only iPad 3 configurations are assigned model number A1416
    MC705LL/A refers to the 16 GB configuration in black. The 32 GB and 64 GB configurations in black are MC706LL/A and MC707LL/A, respectively. The 16 GB, 32 GB and 64 GB configurations in white are MD328LL/A, MD329LL/A, and MD330LL/A, respectively.
    Apple iPad 3rd Gen (Wi-Fi/4G LTE AT&T/GPS) 16, 32, 64 GB
    The Wi-Fi/4G LTE AT&T/GPS iPad 3 configurations are assigned model number A1430
    MD366LL/A refers to the 16 GB configuration in black. The 32 GB and 64 GB configurations in black are MD367LL/A and MD368LL/A, respectively. The 16 GB, 32 GB and 64 GB configurations in white are MD369LL/A, MD370LL/A and MD371LL/A, respectively
    Apple iPad 3rd Gen (Wi-Fi/4G LTE Verizon/GPS) 16, 32, 64 GB
    The Wi-Fi/4G LTE Verizon/GPS iPad 3 configurations are assigned model number A1403
    MC733LL/A refers to the 16 GB configuration in black. The 32 GB and 64 GB configurations in black are MC744LL/A and MC756LL/A, respectively. The 16 GB, 32 GB and 64 GB configurations in white are MD363LL/A, MD364LL/A, and MD365LL/A, respectively.
     Cheers, Tom

  • What's the difference between the old and the new iPod touch?

    I havent seen any real upgrate on the new ipod touch other than the withe color. can anyone tell me whats the improvememt?

    If you have a G2 then there are differences. A much better processor, retina display, a camera and mic, IOS 5 etc..
    http://www.apple.com/ipodtouch/

  • Difference between "Times" font and "Times New Roman"

    I see these fonts right next to each other, and I am wondering if there are any differences.

    I see these fonts right next to each other, and I am wondering if there are any differences.
    Ah, the history of type wars in the twentieth century.
    In the nineteen-twenties when Stanley Morison became typographic consultant to Monotype Corporation, newspapers were still printed with nineteenth century types where the verticals are thick and the horisontals are very, very thin in emulation of copper plate printing.
    Morison famously fought The Times over the legibility of its printing type, and was invited to design and develop a different form of printing type that would stand up to production with flatbed assembly, stereotyping (10% condensing after cooling) onto curved half-cylinders, and high speed presswork with thin inks and thin unmoistened and uncoated paper.
    Morison looked to the printing types of the seventeenth and eighteenth century. With these types one can make an optical trick, because the bown (the counter) is asymmetric and the stress is diagonal and not vertical. This makes the type look broad, even if in fact it is condensed, a trick Matthew Carter later used at Linotype to develop Olympian as replacement for Corona.
    Morison had Victor Lardent at the drawing department of The Times prepare the large scale masters, differently dimensioned for different printing sizes. From these masters, electro-mechanical pantographic routers in turn made the metal manufacturing masters for machine casting and machine composition with Monotype systems.
    The Times was composed in two machine composition systems at the same time, Monotype for titling and Linotype for body copy. Therefore, the new printing type was also manufactured for Linotype composition, that is, for solid line slug casting in addition to single letter sort casting for Monotype composition.
    During World War II, the Monotype works at Salfords in Surrey manufactured machine gun parts in addition to composing machine parts. Meanwhile, in the United States, the Mergenthaler Linotype company applied for a patent on the Times printing type and was granted the United States patent in the North American market.
    Linotype and Monotype first converted to photo-mechanical composition in the nineteen-sixties and then to electro-photographic composition in the first half of the nineteen-seventies and to electronic composition for laser imagesetting with early page description languages and raster image processors in the second half of the nineteen-seventies.
    In this process, the paper masters for metal casting machines were modified in the process of making masters for the new media. Linotype Times was modified for electro-photographic reproduction by Walter Tracy of the Linotype office in London. Walter Tracy's work became the source of the Linotype Times licenced for the Apple LaserWriter in late 1984.
    Linotype had licenced Dr Peter Karow's type production tool, Ikarus, which was the first to implement type as outlines to be populated with picture elements by the raster image processor instead type as patterns of picture elements painted by the type production team in advance of rasterisation. Dr Karow's outline technology was then converted to Dr Warnock's outline technology for PostScript.
    The first conversion to PostScript suffered from shortcomings, and was subsequently redone. Linotype in the first half of the nineteen-eighties was selling Linotronic imagesetters into the rapidly rising market for PostScript offset printing, with the Linotype Adobe Type 1 Library as the preferred type library for the new production platform.
    Monotype entered into a licence agreement with Adobe in late 1988, and in 1989 the bottom went out of the type market when Apple and Microsoft announced the TrueType Alliance with the promise of publishing a free TrueType Specification, Adobe announced that that the Adobe Type 1 specification would be published, Sun Microsystems acquired Folio and announced that the Sun F3 font format would be available, and Agfa acquired Compugraphic after which Agfa-Compugraphic contracted with Hewlett-Packard to provide the Agfa-Compugraphic Intellifont technology for the Hewlett-Packard Printer Control Language page description language.
    Apple developed TrueType 1 with Linotype Times and Linotype Helvetica as models for gridfitting the same as Linotype Times and Linotype Helvetica had been developed as models for Adobe Type 1 gridfitting. Microsoft did not have the rights to Linotype Times and Linotype Helvetic, so Microsoft approached Monotype for comparable core fonts. Monotype then developed Times (New) Roman for TrueType, and a close match for Linotype Helvetica, Monotype Arial (named after the spirit in Shakespeare's The Tempest?).
    Linotype Times, Monotype Times New Roman, Linotype Helvetica, and Monotype Arial are the four type faces that have attracted most engineering attention in the development of technologies to automatically fit an outline to a raster grid.
    /hh

  • Differences between old JavaFX and the new one: some questions

    Hi,
    I'm coming back to my JavaFX studies after 2/3 months and I see that some things are different.. Now, I have some questions:
    1) I see that javafx.ui was deprecated or rewritten in favor of javafx.ext.swing. Why there are a javafx.application.Frame and a javafx.ext.swing.SwingFrame? Which one should I use?
    2) Neither javafx.application.Frame or SwingFrame has the "*undecorated*" attribute that javafx.ui.Frame has. I got this feature only reimplementing createWindow() function like this:
    function createWindow(): java.awt.Window {
           //this is a trick, because Frame don't has a undecorated attribute.
           var f: java.awt.Window = super.createWindow();
           (f as javax.swing.JFrame).setUndecorated(true);
           return f;
    }Should I report this as a bug/RFE in [http://bugreport.sun.com/bugreport/] ? Where should I report bugs and RFEs to JavaFX?
    3) Why frame's opacity don't work in Linux? Is this a Linux restriction or only a "not yet implemented" feature?
    My java -version:
    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
    4) Where is that cool feature that permits me to easily animate in JavaFX doing only x = [1..100] dur 1000? Now, I need to use this more advanced (and more complicated) Timeline object.
    Timeline {
            keyFrames:Timeline [
                    KeyFrame{time  : 0s values: x => 0.0},
                    KeyFrame{time  : 2s values: x =< 180.0 tween Interpolator.LINEAR}
            ]//keyFrames
    }//Timeline;Sorry for the amount of questions.
    TIA,
    Bruno E. Grossi

    The new ones will be substantially faster than yours because it has 8-cores instead of four, a faster Frontside Bus, and faster RAM speed.
    You could use the same RAM, but since the new ones can accommodate a faster RAM module you would cause the machine to run slower by using the slower RAM from your old machine.
    You can use the same hard drives since both machines support SATA drives.
    On the other hand you could just be happy with what you have! It's probably more than you need.

  • Difference between list.clear() and new instance

    In the below code,
    List<String> test = new ArrayList<String)();
    list.add("one");
    list.add("two");
    list.add("three");
    list.clear();
    (or)
    list = new ArrayList<String)();
    list.add("four");
    list.add("five");
    What is the difference between List.clear() and creating new instance for list?

    1. Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    2. Invoking clear() sets all the elements of the ArrayList to null and resets the size to 0.    public void clear() {
         modCount++;
         // Let gc do its work
         for (int i = 0; i < size; i++)
             elementData[i] = null;
         size = 0;
        }(modCount is used to detect concurrent modification and throw an Exception when needed)
    Constructing a new ArrayList creates a new, different, empty ArrayList.
    In many situations they might be equivalent, but not in a case where you have two or more variable references to the same ArrayList. Example (watch out for typos)ArrayList<String> stringsA = new ArrayList<String>();
    ArrayList<String> stringsB = stringsA;
    : // add elements to stringsA
    : // stringsB refers to the same populated list
    stringsA.clear(); // stringsB refers to the clear()ed list
    : // add elements to stringsA again
    stringsA = new ArrayList<String>(); // stringsB still refers to the populated listdb

  • "String str=new String("My String")" v.s. "String str="My String";

    -- what's the difference bet String str="My String"; to this
    String str=new String("My String");

    Its a subtle one. Its also been asked a hundred times before :-)
    When a java class is compiled it "interns" all the Strings it can find.
    Anywhere that you use that string, gets replaced with a reference to that string.
    So the first gets a reference to the interned String.
    The second creates a new String, using the interned String as an argument - results in reserving new memory.
    Take this code:
    String str1 = "My String";
    String str2 = "My String";
    String str3=  new String("My String");In effect the compiler turns it into something like this:
    String internedString = "My String"
    String str1 = internedString;
    String str2 = internedString;
    String str3 = new String(internedString);So initially, it only stores "MyString" once, and all your String variables point at that same memory space. As Strings are immutable in java (the contents never change) this is safe to do. str3 creates a NEW String, which reserves new memory, and copies the contents of internedString into it.
    So
    str1 == str2 (they point to the same bit of memory)
    str1 != str3 (str3 created a new String, so is in new memory)
    str1.equals(str3) (the contents of the strings are the same)
    Hope this helps,
    evnafets

  • What are the differences between ECC5.0 and 6.0 new GL functionality

    Hi Experts,
    What are the differences between ECC5.0 and 6.0 new GL functionality.
    If we want to implement IFRS, I think New GL functionality is very helpful, but why sap is recommending only for ECC6.0 new GL functionality, Eventhough this functionality is available in ECC5.0.
    Best Regards,
    Dharani

    Dear,
    ECC 5.0 vs. ECC 6.0/SAP ERP 6.0
    Functionality not available in the new G/L with mySAP ERP 2004 and ERP Central Component (ECC) 5.0:
    Transfer prices
    Statistical key figures
    Euro translation
    Audit Information System (AIS)
    Archiving
    Data retention tool
    Regards,
    Chintan Joshi.

  • I do video productions for a small local TV station. I use Final Cut Express to edit. I need a new video camera but am at a loss as to what to buy. I know I will get a digital camera but do not know the difference between just digital and digital HD.

    I do video productions for a small local TV station. I use Final Cut Express to edit. I need a new video camera but am at a loss as to what to buy. I know I will get a digital camera but do not know the difference between just digital and digital HD. Also, I can not afford an expensive camera and need some advice on which of the available cameras would be best and also work well with a Mac. One last issue, I currently use a Panasonic #CCD camera that takes a tape. When I load video to Final Cut the audio and video are out of sinc. Go figure. Can anyone help with these questions. Karen

    Hello Karen,
    If you are using Final Cut Express, then look for camcorders that are AVCHD camcorders.  Look especially for the AVCHD logo and specific mention of AVCHD in the specs.  Most of the major manufacturers produce good quality camdcorders - Canon, Sony, etc.
    Also, be aware that there are a lot of "not quite AVCHD" camcorders on the market (sometimes they say they record video as MPEG4-H.264/AVC) - buyer beware!
    Most everything you are going to find on the market today is HD, which stands for "high-def".
    Regarding your question about the Panasonic camcorder, it's best if you post that as a separate question, and please identify the specific model camcorder and the Easy Setup you are using in FCE.

  • Difference between Special GL and New GL

    Dear SAP Gurus,
                            What is the difference between Special GL and New GL?
    Thanks & Regards,
    Sim

    Dear Sim
    If I understood logically, then your question actually refer to special purpose ledger, right ?
    If so both are almost same. Both are for you to depict parallel accounting in your SAP system by storing posting data for the various accounting principles in separate ledgers.
    Whereas special purpose ledger is more custome developed (data is stored in 'Z' table), whereas New GL is more standardised from SAP as well as advanced when compared to special purpose ledger.
    Hope I understood correctly your question and gave some useful input.
    Regards
    Siva

  • What is difference between additive delta and new status for change record

    Hi Experts
    Can any one explain me about the difference between additive delta and new status for change record with example
    if any one has a document please post it iam thank full to u
    thanks
    Ahmed
    Please search the forum before posting a thread
    Edited by: Pravender on Feb 12, 2012 1:54 PM

    Hi
    Additive delta --- We will get the changed quantity.
    say suppose you have sales order and quantity like  1111   30 which is loaded to cube(BW).
    now same record qty has changed from 30 to 40. As we have additive delta, we will get new record as 1111  10.
    new status for change record: This is same as like After image delta type in standard SAP data sources. for every change in record you should have new record.
    say if you have any number which will be generated by system for new/changed record, then you can use this.
    You can use this option when delta option set to "numeric pointer"
    Regards,
    Venkatesh

  • Difference between ecc5.0 and 6.0 new GL functionality

    Hi Experts,
    What are the differences between ECC5.0 and 6.0 new GL functionality.
    If we want to implement IFRS, I think New GL functionality is very helpful, but why sap is recommending only for ECC6.0 new GL functionality, Eventhough this functionality is available in ECC5.0.
    Best Regards,
    Dharani

    Hi,
    In ERP 6.0 we can simulate the result of an online split, which can be previewed and analyzed before a document is posted. I think this is not available in mySAP ERP 2004. In ERP 6.0 there are enhanced interfaces and integration with public sector, contract accounting, human capital management, travel management, and material ledger transfer prices. Most of the new functionality in ERP 6.0 is supported in 2004 version of SAP ERP with support package 10.
    You can check in the below link...
    http://solutionbrowser.erp.sap.fmpmedia.com/Default.aspx

  • If unboxed how could you tell the difference between refurbished imac and new imac?

    If unboxed how could you tell the difference between refurbished imac and new imac?

    Besides all of that, you can purchase Apple Care which will extend your warranty to 3 years just like you can on a brand new iMac.
    If you're considering a "refurbished" iMac, buy it ONLY from Apple.  I believe it's your best bet.

  • Difference between IPad 3G and new IPad 4

    Hi,
    Can any one help me, what is the difference between the IPad 3 G and New IPad 4..?

    What is an Ipad 3 G?
    The main differences between iPad 4 and iPad 3 are:
    1. A6X (vs A5X) processor
         a. 2X the compute power (like Geekbench score)
         b. 2X the graphics power (more frames per second, fill rate, etc)
    2. Enhanced 4G and LTE radio
    3. Faster WIFI, plus 5 GHz N coverage
    4. Lightening connector
    5. 720p Front facing camera
    What is the same:
    1. size, weight
    2. screen resolution
    3. same storage capacities

  • What is the difference between the newInstance() and new

    would be please tell me the difference between the newInstance() and new

    Yes, kablair, you couldn't be more correct in your
    statements. I didn't pay attention to the other
    replies. But anyway, the person who has to clarify
    the question is the OP, that doesn't seem to be
    interested in this subject anymore...Strangely enougth this seems to be quite common (the OP doesn't care about the replies). This is a frustration you'll have to live with if you plan to continue replying to posts at this forum. I deal with it by don't caring about the OP's in return. What the heck, make it an interesting discussion with or without any OP.

Maybe you are looking for

  • Table cast PL/SQL: ORA-00902: invalid datatype

    I m getting PL/SQL: ORA-00902: invalid datatype error in OPEN pPymtCur FOR SELECT * FROM TABLE(CAST( up_gap_tra_reports.myArray AS traArray)); in my package up_gap_tra_reports. CREATE OR REPLACE PACKAGE GAPSDVEL.up_gap_tra_reports AS TYPE traRecord I

  • Stock of Material with Variants (Multiple Characteristics)

    Good Evening All  !!! As per the customer requirement we have configured the material with a combination of Material Group Hierarchy & material characteristics. e.g. Frame with the characteristics like Color, Size, Gender etc. (these can be different

  • Bex Analysis item not scrolling

    Hi Can you help me with my WAD issue? I have a problem where in WAD, the Analysis item is not sctrolling when pressing button "page down", "page up". The only way to operate it is to manually type the page that you require. I marked, exactly what cau

  • Finding windows file in finder

    My wife uses Parallels so she can use Quickbooks and one online database that only works with IE. It is the only thing that goes wrong with her MBP. Trying to back stuff up, anyone know how we find the windows files through the mac finder? thanks

  • Rotated photo reverts when inserted into Word

    How do I prevent a rotated photo from reverting to original when inserting in a Word document?