Skip to content

Instantly share code, notes, and snippets.

@ParkMinKyu
Created August 11, 2015 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ParkMinKyu/a90da03ca695508bf8f0 to your computer and use it in GitHub Desktop.
Save ParkMinKyu/a90da03ca695508bf8f0 to your computer and use it in GitHub Desktop.
조건문과 반복문
public class Test {
public static void main(String[] args) {
boolean b = false;
if(b){
System.out.println(true);
}else{
System.out.println(false);
}
int a = 10;
char c = 'a';
String s = "test";
switch(s){
case "test":
System.out.println(10);
break;
case "d":
System.out.println(20);
break;
default:
System.out.println(a);
break;
}
for(int i = 0 ; i < 10 ; i ++){
System.out.println(i);
}
int i = 0;
while(i<10){
System.out.println(i);
i++;
if(i==10){
break;
}
}
do{
System.out.println("do~while");
}while(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment