Java Program #20 - Print Mirrored Right Triangle Star Pattern in Java

preview_player
Показать описание
Java Program to Print Mirrored Right Triangle Star Pattern
In this video by Programming for Beginners we will learn to write Java Program to Print Mirrored Right Triangle Star Pattern, using Java Tutorial videos.
This Java program is very important for your Java interview questions or if you are learning Java Programming language as a student.

Mirrored Right Triangle Star Pattern:

*
* *
* * *
* * * *
* * * * *
* * * * * *

==========

Java Tutorial for Beginners Playlist:

All Java Programs Playlist:

We can learn Java Programming language to make web applications or mobile applications for android phones and several other applications for windows, Mac OS and Unix operating systems. Also we can make android applications using Java programming. The concepts covered will be related to basic java and core java that will help you in your next interview questions. You can use any version of Java but all concepts will be same for all java versions. I will be using Java SE 8.
Java is a high-level programming language. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Java is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain.

Java JDK:
Eclipse IDE:

YouTube Gears:

#JavaProgram #JavaTutorial #Programming #Java

============================
LIKE | SHARE | COMMENT | SUBSCRIBE

Thanks for watching :)
Рекомендации по теме
Комментарии
Автор

l am Keep following your videos brother, thats👍 really good learning for me

maarivb
Автор

public class mirrorRight
{
public static void main(String args[])
{
int o=8;
for (int i=8;i>=1;i--)
{
for(int j=1;j<=o;j++)
{
if(i==j)
{
for(int p=j;p<=8;p++)
System.out.print("*");
}
else
System.out.print(" ");
}
System.out.println();
}
}
}

Sir this one?

muralihr
Автор

why do we need to put "* " space here after star?

navya
Автор

package example1;

import java.util.Scanner;

public class mirrorRight {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner =new Scanner(System.in);
System.out.println("Enter number of n to print mirror right angle tringle: ");
int a=scanner.nextInt();
// for outer loop
for (int i=1; i<=a;i++) {
// for white-spaces
for (int j=(a-1);j>=i;j--) {
System.out.print(" ");
}
// to print star
for (int k=1;k<=i;k++) {

}
System.out.println();
}
}

}

// my code is here .. is it will works.?

matargashti