[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
I need help again but writing loops  XML
Forum Index » New to Java
Author Message
zeuz101

Newbie

Joined: 09/01/2009 09:48:37
Messages: 4
Offline

1. Write a while loop with a condition that checks if variable "var1" is greater than "var2". The area within the brackets can be blank or just a commented line (//) which shows where code would normally be executed on each time of iteration.


2. Write a for loop with a initilizer of "int i = 0" a condition of "i < 5", and an incrementor of "i++;". The code between the brackets can be empty or whatever you want.


3. If a integer variable "p" was equal to 0, what would it's value be once the line "p++;" was executed?


4. Explain what the incrementor does in a loop. The more details you give the better chance to receive full points.



These are home work questions but i don't have a permanent teacher
 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle