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'm a tech support in a school, approximately our school has over 500 laptops, how can I update the firmware on all laptops at once?Apple Configurator is the software you want - and it's free from Apple. However, I'm dubious that firmware can be upda [More]
My problem is after installing itunes 11.4 this is now a problem The procedure entry point ADiAdID_AcquireMatchSlotIfNecessary could not be located in the dynamic link library iAdCore.dll is the first ERROR and some error 127 reinstall can you please [More]
new laptop doesn't have dvd drive and I cannot find a link to a trial version.  please help1Win: Adobe - Lightroom : For Windows Mac: Adobe - Lightroom : For Macintosh Just download and install 5.7.1. Don't worry about earlier versions.Read other 2 a [More]
Hello. I try to create Standard Midi Files in Logic Pro 7 to perform it with a Yamaha Tyros 1 Keyboard. For my performing I like to have a "classical realtime leadsheet" on the display - chordsymbols, lyrics and the leadvocal line. I got a probl [More]
hI! Im executing the S_P00_07000134 Report but the report did not list some names of the vendors and it tax identification; most of the names are listed but some do not. Tks for yr help!!! depends on how do you run this report . system does [More]
I was able to install all of the Production Suite on my brans new Macbook Pro Retina 13", except for Premiere ans Prelude. It gave me a page full of errors and the internets doesn't have a solution! Help!Does your computer meet Adobe's MINimum http:/ [More]
Hello again! This time I've been searching like crazy for a solution in both the wiki and the forum. But none of the usual ways allows automounting to work in Thunar. I have tried to plug in three different mp3-players and none of them shows up in th [More]
So I basically have my life's work on a hard drive. something happened with it randomly and it couldnt mount the the part of the HD that has all my data on it. (I'm on a porsche design 1 TB external HD) Tried to repair it with disk utility, and I got [More]
i had itunes 7 on my comp, which is total rubbish for playback so i have reinstalled itunes 6 and the playback is way better and it doesnt skip every two seconds. But now when connecting my ipod it says cannot use craigs ipod requires itunes please d [More]
환경 : (no archive log 모드) log_checkpoint_timeout = 0 log_checkpoint_interval = 999999999 redo log size = 200M 현재 check point는 log switch 상태에서만 가능하도록 설정된 것 같습니다. 거래량이 적어서 그런지 log switch는 30시간 주기입니다. 제가 실행한 것은 아래 4번째 로그가 current일때 alter system [More]