![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 1
Rep Power: 0
![]() |
adding control variables
I am trying to figure out how to insert control variables(counters) in a simple GetAVoter program. I am just stuck..and need some insight...this is my first time here, so please be patient
![]() |
|
|
|
|
|
#2 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
Just add a counter variable . . .
It would probably help us to answer your question if you were a little more specific, or if you posted some code.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower |
|
|
|
|
|
#3 |
|
Newbie
|
If you want a simple counter for a loop:
int counter = 0; If you will hjust be using the counter in that loop, use a for loop (the i is the counter that is increased by one every time it goes through the loop, it can only be used in that loop) for (int i = 0; i < 10; i ++)
{
//Loop content goes here
}Hope that helps.
__________________
If you need help with Java, you can go to javaforum.tk and get answers quickly. Programmer YouLikeJava = new JavaProgrammer("Eyvind"); YouLikeJava.printInfo(); YouLikeJava.setWeb("You Like Java?"); |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|