What about compile time support for String.intern()

Then we could use it in switch statements...

Then we could use it in switch statements...Huh? The switch statement syntax would still require a 'type' and that type would have to be String. And the JMS doesn't support String in the byte codes so the JLS and the JMS would have to change.
Since this is a rather simple problem if you use code generation it wouldn't seem like a great addition to me.

Similar Messages

  • WHAT ABOUT FACE TIME?  I'D LIKE TO KNOW IF YOU NEED A PHONE NUMBER FOR YOURSELF TO USE IT TO CALL FROM YOUR COMPUTER

    WHAT ABOUT FACE TIME?  I'D LIKE TO KNOW IF YOU NEED A PHONE NUMBER FOR YOURSELF TO USE IT TO CALL FROM YOUR COMPUTER

    Do you have iMessage? I think as long as that person has iMessage you can use Face Time to call each other.

  • Question about compile-time legality rules for cast conversion

    Hi, In the rules which explain compile-time legality for cast conversion, it is often mentioned the following scenario in the cast conversion of a compile-time type S to a compile-time type T:
    if S is a class type then:
    if T is a class type then either |S| <: |T| or |T| <: |S| or a compile time error occurs. Furthermore, if there exist a supertype X of T and a supertype Y of S such that X and Y are provably distinct parameterized types and that the erasures of X and Y are the same, a compile-time error occurs.
    As regards the quote in bold, I imagine the following scenario:
    1) S <: T and extends Y
    2) Y<T1...Tn>
    3) X<T1..Tn>
    4) T extends X
    Does the above represents a supertype X of T and a supertype Y of S such that X and Y are provenly distinct parameterized types? If that holds, what does it mean that the erasure of X and Y is the same?

    Declarative programing has all but gone the way of
    the doe doe because...
    1: It is not flexible (It is extremely difficult to
    change a complex system in a predetermined way)isn't this the "expert system" model?
    2: It lengthens the development cycle (see item 1)
    3: It normally forces the developer to add many
    things to there code to get things to work, that have
    nothing to do with the intent of the code.more things? the declarations or the declaration processing?
    In its defense (I like a declarative model but, do
    not like being forced into one)...not advocating a forced change in Java
    1: It increases code safety.
    2: It can shorten the development cycle, in certain
    circumstances (especially if it is not overused),
    because it can greatly increase the readability of
    code.
    3: It follows many best practices (although this is
    also possible in a Non-Declarative model).as for best practices what I'd like to see are declarative design patterns, Adapter, Singleton, Factory, Delegate, Strategy, Interpreter, Proxy, Visitor
    too often the design intent is lost in an implementation or design details can only be deduced by class/field/method names, comments, and accompanying docs
    So, if everyone had unlimited time, and an unlimited
    budget, yes declaritive is the way to go. Since that
    is not the case, we filtered out 99% of what it gave
    us, made sure the stuff that was getting in the way
    was removed, and what do you have???
    You guessed it OOA&D.
    Now having said that should we be more declarative? I
    think so, but I will tell you now, REQUIRING
    declarative elements in code is a sure fire way to
    get the majority of development groups to drop the
    language (and I think Java as it stands currently CAN
    be declarative, so if you have one of those unlimited
    budgets, go for it!).no need to require it
    I believe given good (reusable) declarative options, on top of OOP, will become the chosen approach
    reusable design declarations would lessen overall cost and increase readability

  • Please, can Apple give explanations about dropping Applescript support for Pages 13!!??? It is paramount, please do something to fix it asap!!!

    Please, can Apple give explanations about dropping Applescript support for Pages 13!!??? It is paramount, please do something to fix it asap!!!

    You might want to check your firmware version. Go to: Settings>General>About. Look at the version field, it should be: 5.0.1(9A406). If it's 9A405 you need to update the firmware by connecting your phones to iTunes and updating it. This worked for me as I work on a ship and don't have a signal inside. I was having to do your little trick many times during the day when I would go outside to check for messages.

  • Data migration completed what about next time

    Hi Guys,
    I have sucessfully migrate the data into a new system from our existing Quality server, this is just for testing the tdms implementation, but my question is what about next time, suppose i have migrated all the data from 1.08.2007 to till date and package has been completed, but when we start again we need to create another package i guess and if we need to change only the data selection date then do we have to go for all the step or is there any selective option for us.
    Regards
    Subhash

    Hi,
    Please see the help file. Here is an extract:
    If no changes regarding the definition of the objects for transfer have been made, you can create a refresh package to replace the data in the receiver system with current data from the related sender system. You can specify a new 'from-date' for the time-related approach and include additional tables in the transfer.
    The refresh package inherits the setting of the related configuration package, which means that you do not have to execute some of the steps that were required for configuration.
    Procedure
    Place the cursor on the related configuration package, and choose Copy for Refresh.
    Regards,
    Masoud

  • Ideal Time Duration for Payroll International Implementation

    Hi Experts,
    Can anybody please guide me :
    What is the ideal duration for Payoll International implementation along with statutory requirement.
    What are the pre requisites for this.
    What all additional activities required to be done which were excusive to International Payroll.
    Please guide .
    Thanks.

    Hi,
    International payroll with statutory would differ based on the complexity involved in the country norms and pay policies tobe implemented in the schema level.
    Realization effort would definitely will be based on the country specific RICEF and PCR modifications to be performed. Else, the project estimation can be made based on any other country implementation for other phases in ASAP.
    some of the notes to be kept as a checklist for any payroll implementation are-
    1) Clear pay related requirements to be implemented are signed off
    2) Testing scenarios identified by the Users, functional consultants as a workshop session
    3) Parallel runs of atleast two cycle to be incorporated in the plan for implementation
    4) Statutory forms are well designed and tested per the latest SAP release notes
    5) Payroll users are trained and tested with the payroll processes
    6) FI configurations are well defined with the respective accounts to be considered for various wage types
    7) Test some of the end to end scenario for various cities and districts related calculations and different EGs from hiring and processing time, payrollt, posting to payroll and posting to finance
    8) Finalising on check print format and consolidated inputs with appropriate testing
    9) Bank transfer file to be well tested
    10) Reviewing the remuneration statement as pay slips in Portal (PDF format) should be configured and tested

  • Compile-time checking for Serializable

    Hi,
    For an object to be Serialized it must implement the Serializable interface. If any of the objects it stores as instance variables do not implement this interface then run-time exceptions will be thrown. Why can't there be a compile-time check for this? It seems fairly simple to me... Also, why don't the writeObject methods only accept objects that are Serializable? Just changing the method signature to public void writeObject(Serializable obj) throws... should be enough if compile-time checking were available.
    Am I being really stupid or are Sun?
    Dan.

    It would be impossible to reasonably check at compile time, because what if you had a variable of type Object? At runtime it might work because anything could be in there, but if you check at compile time, it would have to fail, because the compiler can't gurantee that the value will be serializable. Also, a non-serializable field wouldn't cause a problem at runtime if it's null, which is another condition the compiler cannot check.

  • What video cards are supported for os X?

    What video cards are supported for os X? besides the one apple sells.

    There is no official list from Apple, since they don't support hardware besides what they will install. YOu can look up support for certain cards, since people have used 3rd party ones. YOu should be able to come up with a particular cards compatability.

  • What is the Quoting Mechanism for String Literals?

    Oracle 10G enterprise edition
    Hi all,
    I am trying to use the new feature support for string literals in 10G.but unfortunately it returns an error. Is there any settings to be done to get implemented with this feature?
    BEGIN
    DBMS_OUTPUT.put_line ('This is ram''s string!');
    DBMS_OUTPUT.put_line(q'[This is ram's string!]');
    END;
    ERROR:
    ORA-01756: quoted string not properly terminated
    Thanks
    Ram

    Art in oracle wrote:
    Oracle 10G enterprise editionAre you sure you are using 10g? (which version?)
    It works ok for me... (10.2.0.1)
    SQL> select q'[This is fred's quoted string]' from dual;
    Q'[THISISFRED'SQUOTEDSTRING]
    This is fred's quoted string
    SQL> set serveroutput on
    SQL> ed
    Wrote file afiedt.buf
      1  BEGIN
      2   DBMS_OUTPUT.put_line ('This is ram''s string!');
      3   DBMS_OUTPUT.put_line(q'[This is ram's string!]');
      4* END;
    SQL> /
    This is ram's string!
    This is ram's string!
    PL/SQL procedure successfully completed.
    SQL>

  • What is the time-zone for Mauritius?

    Can somebody tell me what is the time-zone for Mauritius?

    What time zone is Mauritius in?
    Mauritius Standard Time is 4 hours ahead of Greenwich Mean Time (GMT+4).
    Don't know which one for you to pick, still checking.

  • Question about the java doc of String.intern() method

    hi all, my native language is not english, and i have a problem when reading the java doc of String.intern() method. the following text is extract from the documentation:
    When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.
    i just don't know the "a reference to this String object is returned" part, does the "the reference to this String" means the string that the java keyword "this" represents or the string newly add to the string pool?
    eg,
    String s=new String("abc");  //create a string
    s.intern();  //add s to the string pool, and return what? s itself or the string just added to string pool?greate thanks!

    Except for primitives (byte, char, short, int, long, float, double, boolean), every value that you store in a variable, pass as a method parameter, return from a method, etc., is always a reference, never an object.
    String s  = "abc"; // s hold a reference to a String object containing chars "abc"
    foo(s); // we copy the reference in variable s and pass it to the foo() method.
    String foo(String s) {
      return s + "zzz"; // create a new String and return a reference that points to it.
    s.intern(); //add s to the string pool, and return what? s itself or the string just added to string pool?intern returns a reference to the String object that's held in the pool. It's not clear whether the String object is copied, or if it's just a reference to the original String object. It's also not relevant.

  • Compile time errors for large code in try-catch blocks

    Hi, Has anyone ever faced this problem of a compile time error, where the Java compiler returns with the following error that Code is too large for try block.
    I have about 5000 thousand lines in my try-catch block and am facing this problem. Please suggest possible solutions

    1) Are you sure that your try/catch blocks contain 5 million lines?! I seriously don't believe this.Sounds like generated code. The generator needs to be a bit cleverer. In particular, it seems to be generating repeated blocks of code that ought to be stuffed into methods somewhere.

  • What IOS to get support for IGRP

    Hi
    Have an 2600 router, with IOS IOS (tm) C2600 Software (C2600-I-M), Version 12.3(3), RELEASE SOFTWARE (fc2)
    I do not have support for the IGRP prot?
    How do i get support for that, any ideas about what IOS i have to download?

    Access the software advisor tool on CCO at the following link and choose the option 'Find software with the features I need' and select IGRP and to find images that support IGRP.
    http://cisco.com/en/US/support/tsd_most_requested_tools.html
    I don't know what's the model of the 2600 you have. IGRP on 2611 is supported in 12.2(11)T7 or earlier versions. It appears you may have to downgrade the code to 12.2 or earlier version to enable IGRP. But, check the software advisor tool to pick the right image.
    BTW, is there any specific reason why you want to run IGRP. You can consider EIGRP, successor to IGRP, and there are lot of similarities between them.
    HTH
    Sundar

  • Thinking about using Time Machine for the first time...

    I just assume that updates are inherently good to have, regardless of what it's for. I figure that the developers know a lot more than I do regarding the optimization or improvement of their own software, so I simply allow their download. I'm thinking about using my Time Machine for the first time and reverting back to the pre-9.1 install, if that's even possible. Things were working fine for me and now there are all kinds of issues with communication between my Axiom Pro 61 and Logic. Nothing responds through Hypercontrol anymore, and I don't expect any updates from M-Audio until at least 2012. Anyone else thinking about taking this route?

    Yes, I did. I opened that version immediately after I discovered that 9.1 had that effect and the controller was still inoperative. Of course, I still have MIDI input and PB/Mod wheel control, but that's about it. Everything else would need to be manually loaded, which the Pro series is supposed to do automatically. I haven't restarted my iMac yet, nor have I tried removing the keyboard from the computer altogether and perhaps reconnecting it. Maybe that would reset it...

  • What about iCal event tagging for better event organization ?

    Actually, it is possible to create several calendars (e.g., Work, Personal, Kids, ...) to organize your events.
    Then, you can choose to simultaneously view events of one or many calendars.
    But what about a more flexible tagging mechanism ?
    We would be able to multi-tag an event.
    Then, we would be able to simultaneously view events that match some tags and not some other tags.
    We would be able to create intelligent calendar views that simultaneously display events that match some tags and not some other tags.
    Tagging is a feature provided today by iPhoto for photos.
    Intelligent view based on a expression is a feature provided today by iTunes for musics.
    It would be nice to generalize these concepts
    Is there any plan to introduce event tagging in iCal ?
    iMac   Mac OS X (10.2.x)  

    This is what I think it means:
    "Depending on whether you want the event type to be deactivated when its listeners have acknowledged receipt of the event, select either Upon Notification or Never."
    I think deactivate the event means, it's not available anymore on the queue. You can ensure it doesn't stay on the queue after you catch it (Upon Notification), or you can catch it and then deactivate (or remove it from the queue) manually using your own service.
    "For example, you might select Never if a service is handling the notification and any deactivation of the event type."
    I think that what they mean here. If you select "Never" then, you catch the event, and you're responsible to deactivate it (remove it from the queue).
    Jasmin

Maybe you are looking for