Are you all using java 5?

I am still using java 1.4 but does everyone else use java 5?
I was told that there is no need to update to java 5, since 1.4 is used in most companies anyway

> > I just made a Vector in 1.5 with:
>>
Vector v = new Vector();
Vector is a bit out of date, and it's generally better to declare your variable type as a List.
Program to an interface, not an implementation
> The compiler can optionally generate a warning on
this that it is not a generic type. Then the compiler
compiles it as if is was coded as:
Vector<Object> v = new Vector<Object>();
The compiler only compiles it that way if you write it that way. The use of generics is assistance only for the compiler. The compiler doesn't "add" types for you.
Vector v1 = new Vector();
v1.add(new Object());      // unchecked/unsafe operation
Vector<Object> v2 = new Vector<Object>();
v2.add(new Object());      // no warning
> The benefit of using generic types is that it
eliminates typecasting when retrieving elements:
There are other benefits as well; e.g., the type-checking mentioned above.
> Vector<Integer> v=new Vector<Integer>();
>
v.add(new Integer(1));
v.add(new Integer(2));
v.add(new Integer(3));
v.add(new Integer(4));
Let's not forget about varargs and autoboxing... ;o)
List<Integer> numbers = Arrays.asList(1, 2, 3, 4);
> in Java 1.4:
>
System.out.println( ( (Integer)(v.elementAt(2))).intValue() );
Why so verbose? In 1.4:
System.out.println(v.get(2));And in 1.5:
System.out.println(v.get(2));Not much difference there.
> Or use [i]forall
for(Integer i : v)
System.out.println(i.intValue());I think Sun refers to it as a "foreach", but that's just quibbling. But again, why the extraneous method call? Save yourself some typing and keep your code clean, especially since you're using the new syntax:
for (int i : v) {
    System.out.println(i);
}~

Similar Messages

  • What photo printer are you all using with iPhoto '08?

    What brand and model of printer are you all using or would recommend for use with iPhoto '08?
    I've been reading reviews on HP, Epson, Canon... my head is starting to spin. Thoughts?

    Core Dump wrote:
    There has got to be a backup product out there to allow a system to be backed up to a NAS or Drive attached to a server that is as simple as CrashPlan or TimeMachine but that actually work and don't cost $50/month for a system.
    Thoughts?
    CrashPlanPROe, the enterprise version, is $60 per year per client, not $50 per month, so it may be worth looking into. It's what we run and it's been working very well for us, though you need a central server to run the software. That server can be Windows, Mac OS X, Linux or Solaris, any of which will work with any of the supported clients:
    http://www.crashplan.com/enterprise/support/doku.php/requirements
    We tried Retrospect and had to return it for the limitation I mentioned above.
    Regards.
    Disclaimer: any product suggestion and link given is strictly for reference and represents my opinion only. No warranties express or implied. I get no personal benefit from the sale of any product I may recommend in any of my posts in the Communities. Your mileage may vary. Void where prohibited. You must be this tall to ride. Objects in mirror may be closer than they appear. Preservatives added to improve freshness. Contestants have been briefed on some questions before the show. No animals were harmed in the making of this post.

  • Local Backups - What are you all using?

    We are looking for an opiton for local backup of clients workstations. Sure in some places we don't bother backing up clients stations but we often need to. Having a backup drive on each system gets a bit impractical, Retrospect is dead, and Time Machine via OSX Server hasn't worked with it's meany issues.
    There has got to be a backup product out there to allow a system to be backed up to a NAS or Drive attached to a server that is as simple as CrashPlan or TimeMachine but that actually work and don't cost $50/month for a system.
    Thoughts?

    Core Dump wrote:
    There has got to be a backup product out there to allow a system to be backed up to a NAS or Drive attached to a server that is as simple as CrashPlan or TimeMachine but that actually work and don't cost $50/month for a system.
    Thoughts?
    CrashPlanPROe, the enterprise version, is $60 per year per client, not $50 per month, so it may be worth looking into. It's what we run and it's been working very well for us, though you need a central server to run the software. That server can be Windows, Mac OS X, Linux or Solaris, any of which will work with any of the supported clients:
    http://www.crashplan.com/enterprise/support/doku.php/requirements
    We tried Retrospect and had to return it for the limitation I mentioned above.
    Regards.
    Disclaimer: any product suggestion and link given is strictly for reference and represents my opinion only. No warranties express or implied. I get no personal benefit from the sale of any product I may recommend in any of my posts in the Communities. Your mileage may vary. Void where prohibited. You must be this tall to ride. Objects in mirror may be closer than they appear. Preservatives added to improve freshness. Contestants have been briefed on some questions before the show. No animals were harmed in the making of this post.

  • What flash version are you all using? (RE:Browsing and Performance)

    Curious if anyone is having any luck sticking to older versions of Flash or earlier versions of firefox/safari/camino?
    My Powerbook is mainly a browsing/reading machine now, but even the odd embedded clip will take ages to load, and playing simple games on youplay will push the cpu usage pretty high...

    My Firefox uses Flash V10.0 r12 and works fine.

  • Iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    iba allow others to make text edits. What workflow are you guys using to allow others to make text edits once the iBook has been layed out and formatted?  Is it too late? Do I need to export txt then reimport the editted text and reformat it all again?

    Hi Ken,
    Thanks for the reply. The project I am working on is a test project for a customer. They could potentially want a number of their educational subjects presented as an interactive text book. The intent of this first project with them is to establish a logical workflow that will allow us to efficiently estimate costs and allow for review throughout the design process. Having worked with customers on creative projects in the past I can anticipate that they will want a number of changes made once they see a working version of the interactive text book.
    It is a grim reality that no project can be fully edited and planned prior to working on it and I know revisions and changes are always made once the customer can see their product. It is ok with me if there is no easy way to pass the text back and forth from the customer and me without having to reformat everything but I just want to know that is the way it works in order to provide a realistic time estimate for the project.
    My hope was I would be able to export the formatted text, allow them to make edits and then reimport that formatted text. The style sheets I am using are from one of the iBooks Author templates.
    Do you know if there is a way to use (or export ) this style sheet so it can be used in a Pages Document?
    Or, would the best option be to have the customer install iBooks Author? This would require the customer to have a mac and the software so it doesn't work for all cases.
    Another idea I was considering would be to export the book as a PDF and have the customer add markup and notes to the PDF.
    All of these options do not seem too great to me.
    I am open to any ideas.
    Thanks,
    Rob

  • Are You All Able to get the Output In EXCEL Format

    Hi All,
    I have one question. Are You All Able to get the Output In EXCEL Format?? I am working on Oracle Apllication 11.5.10.2 and my XML builder is 5.0.1. Problem which i m facing is this...... Whenever i am submitting a concurrent program with format type different from PDF i could not able to view the ouput in desired format. When i am pressing view output it gives me a file in XML and when i save that file with extention 'xls' or 'rtf' then i could able to see the saved file in desired format.
    Can anyone tell me where is the problem??? Is it a bug?
    I am using microsoft world 2000 sp-3.
    Please give your valuable comments. May be your comments can solve my problem..
    Thanks
    Ravi

    Hi I got Same issue
    When I change Format to EXCEL from
    Submit request>> Option>> Format = EXCEL
    In window I am getting something HTML code and
    when I try to copy it to Browser from Tools>> Copy File in to Browser I am getting following message
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End tag 'p' does not match the start tag 'a'. Error processing resource 'http://our url.com:8000/OA_CGI...
    <p class="c0"><a name="Text4" id="Text4"><a name="Text1_1" id="Text1_1"><span class="c1">Dept No <...
    But I can see the output when Format is PDF
    Pls suggest solution ,I am using EBS 11.5.10.2.
    Thanks
    Rahul
    Message was edited by: Rahul
    user576181

  • If using wi-fi are you still using part of $15 att plan?

    If using wi-fi are you still using part of $15 att plan?

    No.  You would be using wi-fi.
    the $15 plan is for AT&T's cellular data network.
    Visual Voicemail, however, does use cellular network.

  • Are you happy with Java Applets?

    Are you happy with deploying your Forms to the Web as Java Applets? What kind of issues did you run into? Did you go the Java Applet deployment route for the lack of an easier/faster option? Wouldn't you prefer to deploy your forms as standard JSP pages? I really appreciate your feedback.
    Ali

    Ali,
    I wished things were as easy as black and white. It depends on what kind of application your are building. Is it busineess to business, business to customer, an Internet application or a heavily used internal application with high transaction volumes.
    There are a lot of application types that I, as a Forms Product Manager, wouldn't encourage you to use Forms for. Keeping in mind the memory footprint onthe server, the JInitiator plug in and the download time, self service applications that are of short term use definitively are not what Forms is made for.
    On the other side, JSP still requires a back end because its an interface technology and according to the MVC paradigm the view shouldn't have business logic in it. So you can use EJBs or Oracle's Business Components for Java to build the backbone of your application. In either way you are stepping out of the JSP case.
    There is a reason for all different interface types to exist: Use Java Applet for what they are good for and the Forms design and intended usage really goes in line with that. Please have a look at this Whitepaper for a good insight in the subject of Forms and J2EE technologies
    http://otn.oracle.com/products/forms/pdf/formsj2ee_business.pdf
    Frank

  • When would you not use java

    This is a discussion I would really like to hear some other opinions about. I know some people who keep thinking Java sucks and when they try to use it, they use it for completely the wrong tasks. Now I was thinking, in what situations should you avoid it altogether? This could become a nice reference thread to point those idiots to :)
    I would avoid Java for:
    - performance critical solutions (perfect timing, per frame graphics analyzers, etc.)
    - general public applications. You have to install java first to run your software, which a lot of users will screw up or simply won't do. Java also eats up a lot of memory.
    - platform dependend problems. Generally if your problem description includes the word "Microsoft", you should NOT use Java to try and fix it. You should be using Visual Basic or C#.
    These are really common examples that I see on this forum almost every day. Are there any other examples that are worth mentioning?

    Q>>Now I was thinking, in what situations should you avoid it altogether?
    A>>When they use it for completely the wrong tasks.
    You answered your own question.
    I would avoid Java for:The stuff you say you would avoid java for, pretty much , well to me, says you won't use java.
    - performance critical solutions (perfect timing, per frame graphics analyzers, etc.)Why not, all depends on your algorithms.
    - general public applications. You have to install java first to run your software, which a lot of users will screw up or simply won't do. Latest Linux Distros, like JDS, come already packaged with JRE, so this isn't 100% true.
    Java also eats up a lot of memory. So does windoz OS. I guess I'll avoid it.
    - platform dependend problems. How so??? again see your original Question (Q above).
    Java was created for platform independance.
    When you create a program that considers Solaris, Linux, and cough windoz, Oh , don't forget MAC, you program each case, no big deal.

  • What functionality are you successfully using in your EO SuperClasses?

    Hi Everyone:
    We are very new to JHeadstart/JDeveloper and have just established the method we are going to use at the Entity Level to convert input to Uppercase by putting the following code into a superclass and extending the .xml files of the entities from EntityImpl to this superclass which we called UWEntityImpl.
    What I am wondering is what other ways is this functionality being used by you more experienced JHeadstart Developers? I am trying not to re-invent the wheel and utilize methods that have worked well for you.
    Of course I can think of toLowerCase, what else are you using?
    Thanks so much in advance.
    Mary
    U of Windsor
    Example Code:
    package its.sis.BusinessModel.model;
    import oracle.jbo.AttributeDef;
    import oracle.jbo.server.EntityImpl;
    public class UWEntityImpl extends EntityImpl {
    public UWEntityImpl () {
    // This code converts the inputted string to Uppercase in the database.
    // April 27, 2007 mb
    protected void setAttributeInternal(int i, Object object) {
    Object value = object;
    AttributeDef def = getEntityDef().getAttributeDef(i);
    if ("true".equalsIgnoreCase((String)def.getProperty("UPPERCASE"))) {
    if (value != null && value instanceof String) {
    value = ((String)value).toUpperCase();
    super.setAttributeInternal(i, value);
    }

    to)? I was curious because it seems to store them in
    a proprietary format, and before I get into moving
    hundreds more images I thought I would ask. I have
    2-300 gigs of usable space but Aperture seems like it
    could get huge with image adjustments.
    Hi Eric,
    I'm not a pro, but I wanted to clear up one of your issues. Aperture does not store or convert your files in a proprietary format. The image files that you store in the library will remain in their original format and untouched. The "Library" is a Mac OS X entity called a package. A package appears as a single file, but it's an illusion. If you ever needed to extract your image files, you can do so in the Finder (without Aperture) by option-clicking on the "Library" and selecting "Show Package Contents". Now you can navigate the file and folder structure to get at your originals. Of course, a much faster and easier way is to have Aperture export the originals. However, my point was to clear up the "proprietary" structure misunderstanding.
    Also--as was mentioned--each adjustment doesn't create a new image file. Every new version of your original is merely a list of instructions or "recipe" used to apply adjustments to the original to recreate the version for screen and print. This is done dynamically, on the fly. A finished version of the original is never created and saved to a file until you tell it to export a version. Thus, every version is a very small addition to the database. This is very unlike iPhoto, where every new version of a file creates a new image to store...all the more reason to move to Aperture.
    Hope that helps.

  • •What App. are you guys using as your library????????

    Hi,
    I own Aperture (bought recently) and am in the process of moving my large iPhoto library over. Are you pro users using Aperture as your primary image file library (as in the place you upload your cards to)? I was curious because it seems to store them in a proprietary format, and before I get into moving hundreds more images I thought I would ask. I have 2-300 gigs of usable space but Aperture seems like it could get huge with image adjustments.
    Thanks,

    to)? I was curious because it seems to store them in
    a proprietary format, and before I get into moving
    hundreds more images I thought I would ask. I have
    2-300 gigs of usable space but Aperture seems like it
    could get huge with image adjustments.
    Hi Eric,
    I'm not a pro, but I wanted to clear up one of your issues. Aperture does not store or convert your files in a proprietary format. The image files that you store in the library will remain in their original format and untouched. The "Library" is a Mac OS X entity called a package. A package appears as a single file, but it's an illusion. If you ever needed to extract your image files, you can do so in the Finder (without Aperture) by option-clicking on the "Library" and selecting "Show Package Contents". Now you can navigate the file and folder structure to get at your originals. Of course, a much faster and easier way is to have Aperture export the originals. However, my point was to clear up the "proprietary" structure misunderstanding.
    Also--as was mentioned--each adjustment doesn't create a new image file. Every new version of your original is merely a list of instructions or "recipe" used to apply adjustments to the original to recreate the version for screen and print. This is done dynamically, on the fly. A finished version of the original is never created and saved to a file until you tell it to export a version. Thus, every version is a very small addition to the database. This is very unlike iPhoto, where every new version of a file creates a new image to store...all the more reason to move to Aperture.
    Hope that helps.

  • So how is it fire fox keeps crashing for everyone but the firefox team. are you guys using Chrome or something?

    Firefox 36.0.1
    So firefox keeps crashing on youtube, Facebook, Brainjet, Answers.com. It's often sites that have either forums or auto start videos.
    YET I keep seeing you guys asking for some "Error codes" as if you've NEVER had that problem. So how about this. Instead of assuming that my NON-ADD ON version is the corrupted puppy, tell us what in god's name you guys use.
    Chrome, Safari, IE? there's no way in hell you're using Facebook, Youtube, things that use flash and NOT seeing the crash. So every time you guys ask us for those codes you're lying and hiding the fact that it also happens to you, or you're using something where it doesn't happen.
    I'm amazed that if I open up 3 or 4 windows, sometimes 2 Facebook, a youtube. and something that has comments section, I'm getting this thing locking up and all the research I was doing is wasted where I have to start again.
    So… Don't ask me for any codes. Just tell me what you're using because obviously it's NOT crashing. Frankly I'm shocked so many people keep having the same problems but not one of you guys seem to experience it. I'm beginning to doubt this "surprise" error stuff.

    To be fair, I use a heavily modded version of Fx and my only complaint is memory leakage (starts 450,000K with a few tabs open, flash, etc. and gets up to 1,400,000K even if new tab page is the only thing open). That's probably a plugin issue for me though.
    Usually when Fx crashes it pops up with the crash report menu. You should be able to find some more info about the crash there. It could be a corrupt Fx file, a problem with the JIT compiler, your video card drivers, or even your computer hardware like faulty RAM.
    This help page also mentions a few common causes and how to fix them:
    http://kb.mozillazine.org/Firefox_crashes#Damaged_plist_file_-_Mac_OS_X

  • What are you folks using HTML5 for?

    I am curious what you folks are doing with HTML5.
    What do your clients want you to do with it?
    Does Dreamweaver CS5 functionality suffice or do you have to complement it with handcoding or by using extensions?
    I somehow have the impression that many HTML5 extensions are quite expensive.  I don't know if that really is the case.
    J.S.
    UltraSuite

    pziecina wrote:
     Unfortunately the take-up of anything will always depend upon the user, the client and the designer/developer. The problem is similar to the use of css for layout vs's tables being used for layout, no matter what one does as long as the 'old' way of doing things is still supported, (and help is available when something goes wrong) then any arguments for doing it another way, (even if recommended and better) will always have its opponents.
    I have no problem with the idea of using HTML5. Some parts of it are extremely useful, and should be adopted immediately. For example, the doctype is perfectly safe to use on any website, as are the new types of form input. The great advantage of using the date and number input types is that they're already supported by some browsers. Older browsers simply treat them as normal text input fields.
    I'm less excited by the new semantic elements, because there's no support for them in any assistive technology. It's probably more effective to start using the WAI-ARIA role attributes first. I also think there's a lot of confusion about the way articles can be nested sections and vice-versa. I've done a lot of reading about this subject, and there seems to be little consensus about the most appropriate way of marking up documents. That's why I'm going to make haste slowly in that regard.
    I have just finished reading Jeremy Keith's "HTML5 for Web Designers" published by A Book Apart. What struck me was the way he left the semantic elements to the end, and expressed similar doubts about their usage. Most other books and articles wax lyrical about how wonderfully semantic the web is going to be thanks to HTML5. I have my doubts. When I look at the daily procession of visitors to this forum who have no idea about paragraph tags, never mind divs or spans, I foresee websites constructed with a horrendous tag soup. That's not to say that the idea of semantic tags is bad. I'm just pessimistic about how they'll end up being used.
    Now the normal argument. Users must see the same design across all browsers, well, how many normal users will look at a site on more than one browser? We may compare sites across browsers, but the average user, unless it is a comparison of the site on their pc with a site on a handheld/smartphone then probably never.
    I think Andy Clarke has the right approach in his "Hardboiled Web Design". He sees the proliferation of mobile devices as the perfect opportunity to convince clients that it's impossible to make websites look exactly the same across all devices.
    The really interesting developments at the moment are coming more from CSS3 than from HTML5.

  • Are you all for DB code in GUI?

    I am working on a project where the company who makes the object oriented database we use told us to put the DB calls in the Swing GUI objects for performance reasons.
    The senior engineers on the project at the time (I came later) didn't put up a red flag that: 1. that significantly ties us to their DB (how convenient) and 2. maybe that just means we need to use a different DB if we should buck industry standards to use it effectivily.
    I was the first to buck their idea and I implemented DAO pattern. I literally had to argue with those who have been working here before me because I did this.
    So I ask, is it me or are my points 1 & 2 above valid no matter what the DB company says? Are there valid situations you can see for putting the DB code in the GUI on a project with 10 developers (just to give a relative size of the project)? I just need a reality check since the people I work with don't agree.
    Oh, yeah, and by the way, we have a Swing application that hits the central DB AND a web app that does as well. Of course there is some functionality that is to be displayed in both apps but not all functionality is repeated. Maybe that will help with your decision as well.
    thanks.

    These guys have their heads way up their asses. You are right. This is not going to cause performance issues. In fact if you aren't really careful, putting this is the GUI code is going to screw up the performance of the GUI.
    I don't know where your coworkers are getting these ideas from but they are patently absurd. Good for you for sticking to your guns. I know this can be extremely frustrating.
    If you are really taking heat on this, you should but the burden of proof on the people who are making these claims. Ask them how this will improve performance.

  • Project Manager? How do you all use it?

    Hi. Im new to the project manager. It seems as if it could be of benefit to me using it to organise my sessions. What is it for and how do you use it. I have read the manual but want some personal feedback. Thanks, Ben

    in theory, the PM keeps tabs on all the files used/made in your sessions.
    sorta like a dedicated version of spotlight.
    the initial scan takes a while, but then all your audio, midi and patches are in one place after that.
    i do a PM scan before and after each important session.
    PM can miss stuff, so if you've just added a new sample lib, or tracked some vox for eg., it's a good idea to scan just the audio file section of the tree on the left.
    similar with new esx instruments, songs, etc.
    the find function allows you to see all clips that meet with the critera set and i use that to check for copies, duplicates, redundant files, etc.
    you can also edit any files PM finds. in this way, it's like a bigger, better version of the audio window.
    it's too bigger subject to go into too much more detail here, but sufficed to say, i have a lot less trouble with logic finding things if PM is kept up to date.

Maybe you are looking for

  • Best practice on creating composite services

    Good afternoon, experts. I was wondering what would be the recommended way to create a new enterprise service that is basically the orchestration of other enterprise services, for example, already provided by business suite. I guess I can model the o

  • You can't open the application Library because it may be damaged or incomplete

    I am a newby to the support communities as a questioner though I have searched and found quite a few answers to other problems.  My problem today is the above message whenever I click on an .mp4 file in my Finder.  The files are in my iTunes Library

  • How to change timezone in B2B to reflect date fields per local time in DB

    Hi, I am in EST zone and I could see the data in database with date columns having time in PST. One of my transaction just errorred , I could see from B2B user interface tool error report message date time as 2:14 EST, while when I check the database

  • Cost of a PowerBook in 2008

    I recently came across a person selling a 17 inch, G4 1Ghz, 1GB RAM, 90GB HDD, with two power bricks and 2 additional batteries (total of 3)... the price is $500... is it worth the money? I'll be using it primarily for GarageBand so that I can record

  • Network connection reset during download of a season. Now one episode won't work.

    I bought a season of Entourage and during the download the "network connection was reset." Now one of the episodes won't play right, eg. there is green stuff on the screen during the part that works and it won't even play past about 8 minutes. Is the