|
|
check your development Java runtime envriment,exp:JDk1.5 hava the Iterator interface,but before this version,have no Iterator interface.I test the programe throught JRE1.6 of my dev computor,the follow is the message of console:
aaaa
index = 3, value = 3
index = 2, value = 2
index = 0, value = 1
|
|
|
|
|
TorstenH. wrote: Why do you add via the iterator? you can add directly to the ArrayList.
Why are you so insistent on telling this guy how to build his application when you have no idea what his requirements are? There are perfectly valid reasons to insert via a ListIterator. That's why the method exists on the interface.
|
|
|
|
|
how to insert data to mysql in java?
|
|
|
|
|
try this[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Try first to walk and then start running.
|
|
|
|
|
Code Project is not a search engine. If your questions are one line like this, you should use a search engine instead of wasting the time of people here.
|
|
|
|
|
how to greate button in java and click event
|
|
|
|
|
try this[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
|
How 2 calculate response time of website using java.....
|
|
|
|
|
Start by reading the answer here[^]. It is not acceptable behaviour to repost a question in multiple places on this site.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
hai developers please provide above project .......
please send that source code to manmad160389@gmail.com
i have only 15hours time to complete that project please send to specified mail id..
|
|
|
|
|
1. This is a java forum
2. You should start your homework sooner.
|
|
|
|
|
Hello
when I pass iterator as a parameter why is it that the cursor position changes without me giving any instructions about
iterator.next() or
iterator.previous()
any good article regarding iterators I need to read will be of great help especially passing as parameters
PRitha
|
|
|
|
|
prithaa wrote: when I pass iterator as a parameter why is it that the cursor position changes
It doesn't.
Something else is going on. Some possibilities.
1. You are in fact moving it somewhere.
2. You expect that item A should be first, thus when it doesn't show up first you think the iterator changed while in fact A was never first.
|
|
|
|
|
If you are passing it to a method, that method might well do something with it which will move the cursor.
|
|
|
|
|
thank you for your valuable insight
|
|
|
|
|
Hi. I've been trying to find online on how to draw lines in a canvas using Netbeans IDE.I'm currently making a desktop application that calculates for certain physics things. My main issue is that I can't figure out how to draw into a canvas.I've looked plenty on google, and what I run into is code that doesn't clarify my issue.
All I want to know is how to draw some lines into a canvas that has been created with Netbeans by pressing a button.
Any suggestions are more than welcome. Thanks for your time.
|
|
|
|
|
|
i have created a one java script file in that i have written a html code in boilerplate variable and ajax to call servlet .
in java servlet i have written a code for select query as to select data from database table and store tihs value in resultset
i want to store this resultset value in to javascript variable.
how i store it ???????
eg:-suppose i have table with firstname and Lastname fields and if i retrive this column in java servlet then i want this two column value to save/store in a java script variable on java script file
like var fname=????
var lname=????
|
|
|
|
|
|
Hello
I am using add and previous method of iterators
List<objectt> list = new ArrayList<objectt>() ;
ListIterator<orderedpair> iterator = list.iterator();
iterator.add();
iterator.previous();
but I get exception after previous() .Are there any example to refer for proper usage of add alongwith previous()
Pritha
|
|
|
|
|
why are you using an iterator? it's a List .
list.add(value);
should work fine.
|
|
|
|
|
thanks for ur reply
yes that works fine
but how do i go to previous once an element is added.
i get an unhandled exception checkforcomodification
pritha
|
|
|
|