Thursday, July 23, 2015

Create pyramid in Single For Loop

Hay Guyzzzzzz Today I Show how to create pyramid just in single for Loop

Let's Start


import javax.swing.*;
public class stars{
  public static void main(String args[]){

// now create counter variable
for(int i=1; i<=10; i++)
{
//create to string variable
String str="*";
String str2=str+"\n";
}
Joptionpnae.showMessagedialog(null,"ste2");

// Complete
}
}

No comments:

Post a Comment