Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15920
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Updating code from jdk1.2 to recent jdk SE 1.6 |
| Date | 2012-07-10 11:26 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <de29d6dc-c1e0-43ae-af74-0f0675a744f1@googlegroups.com> (permalink) |
| References | <725fbc58-fab7-4e70-9f1a-b2e393fdeca9@googlegroups.com> |
Sanny wrote: > Well I had a program/ Applet in Java 1.2 I want to migrate the code to Java 1.6 It should be forward compatible. > Will I see any benefit with the migration? One hopes. It depends on many things, but in general terms Java 6 is more stable and performant than earlier versions. > 1st what are the things that I can use/ redesign for improvements? That depends on your current design and what it uses. > Does compiling with a new version improve performance? Probably not. > I want to use Vectors/ Search / Sort Algorithm/ etc. When you say "Vector", do you mean the Java class 'java.util.Vector' or the general concept of "vector" (in which case you use lower case). 'java.util.Vector' is overkill and out of date. For most (not all) purposes you should prefer 'java.util.ArrayList'. > Currently I put data in String. What do you mean by "data"? > Will it be faster if I define Classes instead? Faster? That depends on the data. Better? Unless your data are inherently strings, then 'String' is the wrong type. > Problem with classes is that searching/ copying an array of classes is very time consuming. How time consuming is "very"? How did you measure it? Under most circumstances, searching structures of objects with a well- crafted type will be orders of magnitude faster than searching 'String' structures. Hash-based algorithms eradicate much of this difference when available. On what did you base your assertion? > Every time a class is to be sent to a function a new class has to be created and all values need to be copied. In what language are you working? This is simply not true for Java (which, by the way, calls its functions "methods", which only matters if you have a tendency to think of functions as they work in other languages). > .clone() is also very time consuming. What does that have to do with anything? Very few programs need 'clone()'. To answer your question about what redesigns will help, eliminate all 'clone()' invocations. > Does the latest version of java [sic] has done something > So that I can use Classes [sic] efficiently? No, that depends entirely on the programmer, and always has. > Also String comparison and assignments are inefficient. Are they? What is "efficient" and how inefficient are these in your program, and how does that damage anything? > lastly will I be able to use setchar() in Strings? using Bufferstring [sic] is very problematic. <http://docs.oracle.com/javase/7/docs/api/java/lang/String.html> Did you mean <http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html> ? Don't use that. For the really very rare cases when you need something different from 'String' use <http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html> > > Sending String and Class Variables to functions is very time consuming. No, it isn't. Where do you get your information? > Does new version of Java gives any good things for Applets? Check the docs. > Can I use multilingual? Can I use 3d graphics in Java Applets? Yes. > ============== > > Topic Changed. Then post in a different topic. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Updating code from jdk1.2 to recent jdk SE 1.6 Sanny <softtanks22@hotmail.com> - 2012-07-10 10:07 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-10 11:26 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Luuk <luuk@invalid.lan> - 2012-07-10 20:32 +0200
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-10 11:56 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Luuk <luuk@invalid.lan> - 2012-07-10 21:05 +0200
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-10 12:56 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Roedy Green <see_website@mindprod.com.invalid> - 2012-07-11 15:19 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-11 15:50 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Gene Wirchenko <genew@ocis.net> - 2012-07-11 16:41 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-11 17:03 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-12 00:51 +0200
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Arne Vajhøj <arne@vajhoej.dk> - 2012-07-11 23:13 -0400
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Sanny <softtanks22@hotmail.com> - 2012-07-11 00:27 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Silvio Bierman <silvio@moc.com> - 2012-07-11 13:12 +0200
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-11 14:02 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lars Enderin <lars.enderin@telia.com> - 2012-07-12 00:06 +0200
OT Google Groups formatting. Was Re: Updating code from jdk1.2 to recent jdk SE 1.6 markspace <-@.> - 2012-07-11 15:16 -0700
Re: OT Google Groups formatting. Was Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lars Enderin <lars.enderin@telia.com> - 2012-07-12 11:00 +0200
Re: OT Google Groups formatting. Was Re: Updating code from jdk1.2 to recent jdk SE 1.6 markspace <-@.> - 2012-07-12 10:36 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-12 00:54 +0200
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Lew <lewbloch@gmail.com> - 2012-07-11 16:25 -0700
Re: Updating code from jdk1.2 to recent jdk SE 1.6 Roedy Green <see_website@mindprod.com.invalid> - 2012-07-11 15:15 -0700
csiph-web