
*
* * * * * *
how to generate this pattern in java??

Hi friend try this code may this will helpful for you
public class PrintRectangle
{
public static void main(String[] args)
{
for(int r=1; r<5; r++)
{
System.out.print(" ");
for(int c=1; c<7; c++)
{
System.out.print("*");
}
System.out.println();
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.