Amicuk Programming Answers

For good Method

-0001-11-30   Views:0


Hi All, I want to add some sequence number to Vector container. for example, 3,4,5,6,7,8,9,10 how to make best way to add those number to container, I do not like the following code for(int i=3;i<11;i++){     container.add(i); }the thing is, I do a q

Hi All,
I want to add some sequence number to Vector container.
for example, 3,4,5,6,7,8,9,10
how to make best way to add those number to container,
I do not like the following code
for(int i=3;i<11;i++){
}the thing is, I do a quick search on an object array, i get the start Index, and end Index.
since maybe there is a lot of records match the search conition, let me see, 3,000.
Any hint would be great appricated.
Thanks in advanced!

The replay answer
As from ur question, i can see that ur trying to hold the premitive values,
if you need to hold primitive types, arrays are the way to go, since the collection classes can only hold instances of Object. The class java.util.Arrays includes some useful algorithms for processing arrays,
And in case if ur using the objects, Array list would be the bettter option, Just find the below link why arraylist is better,

Go to See the other 6 answers

Error while calling a method on Bean (EJB 3.0)

Category:DefaultRelease time:2015-10-11Views:130

I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me Error is --> Error while destroying resource :An I/O e[More]

Issue with SharePoint foundation 2010 to use Claims Based Auth with Certificate authentication method with ADFS 2.0

Category:DefaultRelease time:2015-10-11Views:130

I would love some help with this issue.  I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0  I have a test account set up with to use the ACS. When I log int[More]


Category:DefaultRelease time:2015-10-11Views:130

Hi, I need to use the following method. G_SET_GET_ALL_VALUES. But I'm not sure of the data type that it returns. CALL FUNCTION 'G_SET_GET_ALL_VALUES'   EXPORTING   CLIENT                      = ' '   FORMULA_RETRIEVAL           = ' '   LEVEL         [More]

Clearing values from request in decode method

Category:DefaultRelease time:2015-10-11Views:130

I am using a custom table paginator. In its ‘decode’ method I have the next code to control whether ‘next’ link is clicked: String pLink = (String)requestMap.get("pLink" + clientId); if ((pLink != null) && (!pLink.equals("")))[More]

Method all values from row

Category:DefaultRelease time:2015-10-11Views:130

Hi, Is there a method that get the all the values of a row? I've gone through the java api but didn't found one, but wanted to be sure. If not I'll have to do getValueAt for every column? GrtzHere is one possible implementation using RowTableModel (a[More]

How can I move an ArrayList from one method to another?

Category:DefaultRelease time:2015-10-11Views:130

As the subject reveals, I want to know how I move an ArrayList. In one method, I fill my ArrayList with objects, and in the next I want to pick an arbitrary object out of the ArrayList. How do I make this work??You pass the same array list to both th[More]

HT1918 Can I have multiple payment methods on one account

Category:DefaultRelease time:2015-10-11Views:130

Currently, both of my teenage sons and I are sharing an Apple account with one payment method. I would like to have a payment method for each of us.If they are teenagers, it is not too soon to set up individual accounts per person.  This will address[More]

A method to convert an existing iCloud account to a Child iCloud Account for Family Sharing

Category:DefaultRelease time:2015-10-11Views:130

I do not see any method by which to convert an existing iCloud account (we have three set up for our kids, all their birthdays are set later than their actual birthdays so we could grab their actual names before they were all gone years ago) to a new[More]

How can i execute ejb method in a servlet?

Category:DefaultRelease time:2015-10-11Views:130

hi I am using a IBM HTTP Server and Weblogic Server. I could execute below source in a main method of application but i could not that in a init method of servlet because of ClassCastException. (a classpath of weblogic contains client's classpath) //[More]

Can I use classes and methods for a maintenance view events?

Category:DefaultRelease time:2015-10-11Views:130

Hello experts, Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Th[More]

How to call a specific method in a servlet from another servlet

Category:DefaultRelease time:2015-10-11Views:130

Hi peeps, this post is kinda linked to my other thread but more direct !! I need to call a method from another servlet and retrieve info/objects from that method and manipulate them in the originating servlet .... how can I do it ? Assume the origina[More]

Hi Experts, I have developed report for purchase register . if i execute this report in background process i am not able to get the downloaded file in excel and output is also not coming properly, columns are going to overlap. i used open dataset  re [More]
Hi have an urgent issue. When i send the output of report which contains japanese data through "send forecast as excel" then an excel sheet is saved on desktop in which im getting junk characters instead of japanes? but when i save this list by [More]
Hi, I have a scenario where I need to use Embedded Oracle along with Application. For that I have performed the folowing Steps and I need anyones suggestion regarding this: 1.I have created Template from Existing Database from my Local Environment (. [More]
Hi there! We have an head office account. When we viewed it in FBL5N with the following paramters: Customer, Company code and Open item as of xx.xx.xxxx. The result of which for example is 50000USD. Then we tried to use FBL5N but with different param [More]
Hi, I want to use a collection as a Table.Can anyone give me any code sample for that. I am getting a collection through in parameter and want to join that rows with another table to out another collection.I want that because if I will do the operati [More]
Looking for Drivers or Manuals, want to talk to an Acer Tech or just read Acer FAQs?  Read this article for information about how Acer is here to help you get the most out of your Acer Product.I am looking for a simple answer about the specs of my sy [More]
I'm wondering why certain popular packages, such as Banshee and Bash, take so long to be updated in the stable repos. Banshee 1.8.1 was released almost a month ago, and Bash 4.2 over a week ago (now in testing). It seems like some packages are update [More]
Hi everyone! It seems that I'm not able to view this streaming video from France by Fazz Music. After clicking on the link for the stream, a Safari window opens with a black background and with what looks like the QuickTime control bar. Here are my s [More]
Hi guys! Can I pick your savvy brains on something: I've been seeing people having a mini version of the Apple logo displaying next to their Twitter names, looks pretty cool, how does one do that? Thanks!Hi guys! Can I pick your savvy brains on somet [More]
Bw 3.x system is there any way to check how many hierarchies,attribute,text available in the system in active stat Edited by: nam2000ind on Jun 11, 2008 2:42 PMOk...Thanks... But Can you tell me how to find how many characteristis defined with master [More]