Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AakashCode12/5e9190e09993c6816e7031ce429b0686 to your computer and use it in GitHub Desktop.
Save AakashCode12/5e9190e09993c6816e7031ce429b0686 to your computer and use it in GitHub Desktop.
class cmd_line{
public static void main(String args[]){
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
//! condition example
System.out.println("The condition Example");
System.out.println("The greater no between the two\n");
if(a>b){
System.out.println("the number "+a+" is greater than "+b);
}
else{
System.out.println("the number "+b+" is greater than "+a);
}
//! looping example
System.out.println("The Pattern using loops is :");
for(int i=0;i<5;i++){
for(int j=0;j<i;j++){
System.out.print("*");
}
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment