Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15935

Re: Updating code from jdk1.2 to recent jdk SE 1.6

From Sanny <softtanks22@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Updating code from jdk1.2 to recent jdk SE 1.6
Date 2012-07-11 00:27 -0700
Organization http://groups.google.com
Message-ID <b9acd499-b09d-4fe4-ba3a-91f46258a88c@googlegroups.com> (permalink)
References <725fbc58-fab7-4e70-9f1a-b2e393fdeca9@googlegroups.com> <de29d6dc-c1e0-43ae-af74-0f0675a744f1@googlegroups.com>

Show all headers | View raw


> &gt; Currently I put data in String.
> 
> What do you mean by &quot;data&quot;?

Say I have employee data: Name, Tel, City, Salary.

Either I can put them in a class or Comma Separated in single String.

Creating a class then sending that class to a function or database is not much efficient.

But comma separated String you just have to send one string and each Value is separated in the String using "separator comma".

But addition and removing data from String is very inefficient.

Say I have to change tel number. 

1. function changetelnum(String ss, long new_tel, long old_tel)
{
//STEPs LIST
// search old_tel number in all strings
//replace old_tel number by new_tel
// Create a newString with "Name, Tel, City, Salary."
//return newString
}

If I use Classes I have to send Employee class to function

1. function changetelnum(EmployeeClass ss, long new_tel, long old_tel)
{
//STEPs LIST
//Search Class with old tel number
//replace tel number by new_tel
// return(ss);
}

What do you think which one is faster Sending String or Sending a Class? for changing tel number in an Emplyee data?

Is there any other data stricture that does it better?

When I pass a parameter Class "EmployeeClass" Does the Java Compiler create a new Class ss "EmployeeClass".

Is there any other way to change telnumber?

Is there something in new versions of Java that can do these things faster?

Other thing is How much memory does a class take and a String will take.

Say I have an array of 1 million Employees.

String[1million] How many MB this array will take?

EmployeeClass[1million] How many MB this array will take?

{
Name:
Tel:
City:
Salary:
}

Is there a way to save memory for shorter Strings. Say having just 15 digit string? Or all strings are of 256 char size?

How much Max memory an Applet can take in an ordinary computer.

If a Computer has 1 GB RAM can my applet utilize all that RAM? or the Browser will only give a few MB? Is there any way to request more memory by Applet from web-Browser if Available RAM in Computer is 2GB or 4GB?

How can my Applet know how much Memory is available to the applet?

How can an Applet know how many cores are present in System and assign each thread to a separate Core?

Bye
Sanny

Wandering in Java Forest.
Fireman Game: http://www.GetClub.com/Fireman.html 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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