-
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
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
bej
4 comments · 1 points
-
dimithri
5 comments · 1 points
-
-
Popular Threads
-
Windows 7: How to Prevent the Mouse from Waking your PC
13 hours ago · 1 comment
-
Outlook 2010: Turn Off Attachment Preview
1 week ago · 1 comment
-
Gmail: How to Send SMS Messages Without Using Email
2 weeks ago · 2 comments
-
Windows 7 – Prevent Live Messenger from Opening at Start Up
1 week ago · 1 comment
-
Symfony: Drop Down List Box Without Submit Button
3 weeks ago · 1 comment
-
Windows 7: How to Prevent the Mouse from Waking your PC
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();
}
}
}
}