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]

I am having trouble in upgrading my BlackBerry Q10 from OS 10.2.0 to 10.2.1. I have tried to manually scan for updates through my device  but it said you have the latest Software installed on your device, I then connected my device to the BlackBerry [More]
IPOD Classic. I have set up Itunes on Compaq XP laptop and have my library and Podcast subcription list on it. NOw I have a new desktop Gateway with Vista and have downloaded the itunes program from the apple site. I desire to get everything from the [More]
Dear SDN chaps. Today morning. I encountered a strange issue in DSO.. I have DSO which is updating from the AL11(application server) flat file. While i am loading it to PSA there were no issues and after loading it to the DSO there is no issue and it [More]
While executing the database creation at the middle it is asking for password even if i give password (first attempt ) or empty enter (Last attempt)i'm unable to connect the database. Password for DBSNMP user: null [ORA-03114: not connected to ORACLE [More]
When my major node reboots I was getting the error: Trying to remount /global/.devices/[email protected] mount: /dev/md/dsk/d50 is already mounted, /global/.devices/[email protected] is busy, or the allowable number of mount points has been exceeded WARNING - Unable to mo [More]
Hi! I'm trying to write an animated applet the shows the Java Duke waving. No problem getting it to work, but the applet is flickering and I sence the need for double buffering. I've tried to use "traditional" double buffering techniques without [More]
Hi,      Updated to Mavericks, only one site show question mark instead of images. Tried safari, chrome and firefox all of them have same problem of showing images of this site. Tried reset, empty cachs, cookies, did not work. Any one have a clue to [More]
Hello All, I have ECC dual stack server at EHP3 and i am upgrading it to EHP4 via EHPI Tool. In EHPI wizard "Configuration" step for ABAP is done properly but in J2EE it is stuck with an error "An error has occurred during the execution of [More]
Hi I try to create alert on table that already on HR schema, the problem is when i create the alert it will create invalid trigger on database because HR schema not allow to select from fnd_profile_option_values table, i try to give permission from A [More]
I have a table 'orderlines' with columns line_id, ship_flag, service_flag, bom_order. I need to generate the order line number in the following way select the orderlines order by bom_order for the first line the line number is 1.0 for the next line i [More]