-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/672/java-for-loop-iteration-syntax/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
4 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
1 week ago · 2 comments
-
Gmail: How to block a sender from your inbox
2 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
3 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
for (int i = 0; i < array.length; i++) {
System.out.println(array[i]);
}
"for(int i:arr){System.out.println(i);}"
#######
######
#####
######
#####
###
##
#
/**
* @(#)hehe.java
*
*
* @author
* @version 1.00 2009/10/7
*/
import java.io.*;
public class hehe{
public static void main(String args[]) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int user;
int pass;
int i=1;
String yesno;
char yorn;
while(i<=3){
System.out.print("Enter Username:");
user=Integer.parseInt(input.readLine());
System.out.print("Enter Password:");
pass=Integer.parseInt(input.readLine());
for(int j=0;j<=5;j++){
System.out.println();
}
System.out.println();
if((user==2009)&&(pass==2010)){
System.out.println("ACCESS GRANTED!");
for(int j=0;j<=5;j++){
System.out.println();
}
System.out.println();
}else
{
System.out.println("=ACCESS DENIED=");
System.out.println("Please Try Again");
for(int j=0;j<=5;j++){
System.out.println();
}
}
i++;
String choice;
System.out.println("Choices:");
System.out.println("A.PURCHASING ITEMS");
System.out.println("B.EXIT");
System.out.print("Enter Your Choice: ");
choice=input.readLine();
if (choice.equals("A"))
{
}else if(choice.equals("B"))
{
System.out.println("Do you really want to exit?");
System.out.println("Yes(Y)No(N)");
yesno=input.readLine();
}
}
}
}