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 really like the parental controls in Yosemite - nice granularity and good job Apple.  However, there is one challenge that I face that hope as an easy answer that I may be overlooking. I have Web parental controls set to the default of 'Try to limi [More]
Hello, I just bought a new MacBook Pro with Mountain Lion and I just installed BootCamp and Windows 7 Professional. The problem I have is that I bought an upgrade version of Windows 7, so I need to install Windows once without entering the product ke [More]
Hi I am writing an IMAP Web client using Javamail. I want to know the changes happened in the Exchange Server after my last accessed time. The changes could be any of below. 1.) Marking the message to Read 2.) Deleting a message 3.) moving the messag [More]
Summary We're trying to setup SNC with the SAP Crypto library on AIX, but we're getting inconsistent SSO access to the PSE depending on whether we run from the command line or from a daemon process that runs with the exact same user account. Put diff [More]
I down loaded Adobe Reader 8.1 to my laptop running Vista Home Premium. My wife and I have separate user accounts in Vista, both being aministrative. I have no trouble using Reader under my account but when my wife tries to use it under hers, she get [More]
Hi Jr, I have managed to get my work book with multiple queries in it. which is working fine n the credit goes to your answers in the forum. Now I want to insert views instead of queries. when I tried to do so it is giving me some critical error. Can [More]
I recently deactivated my Creative Cloud on an old Mac and installed on a new one. When I try to launch Indesign it list a number of 9.0 version plugins that are needed. Where do I get these?Which version did you download? Do you have a subscription [More]
I have my ipad, iphone, and macbook pro all synced together, which generally works fine.  I receive all emails from senders in my address book in my Macbook Pro and iPhone, but some end up in Trash on my iPad, with the message, "This message cannot b [More]
I purchased the Education Edition of CS4 Design Premium a couple of weeks ago and was able to install everything except Illustrator. I'm on an iMac, that's a little over a year old, running on OS X 10.5.8. Here's the steps I took and what I encounter [More]
Hi gurus, Is there any solution how to auto expand hierarchy in OBIEE 11G?So i do not have to click plus(+) sign one by one manually. Thanks JoniI don't think its possible here... Option available are just for "Collapse all items in this column" [More]