Star Pattern in Java- 1 Program (Logic)
HTML-код
- Опубликовано: 7 фев 2025
- #starpattern #starinJava #starLogic
Star Pattern in java
Full star and number pattern playlist :
Star and number Pattern in Java with logic: • Star and number Patter...
Code repository: github.com/tal...
Follow on Facebook: / talenteddeveloper
GitHub:
github.com/tal...
Related Queries:
Star Pattern Programs in Java (with Logic),
Java Programming Patterns with example (Nested Loop),
Logic Patterns in Java,
Pyramid Pattern in Java,
Star pattern logic,
Star Pattern Programs in C,
Star Pattern 6 Program in C Hindi,
Write a java program to print star pattern?
Write a java program to print a pyramid pattern of numbers?
Triangle pattern in java,
Number Pattern in Java,
how to print star patterns in java using eclipse, java patterns.
Java Program to Print Star Patterns,
star pattern in java,
pattern programs in java
Took me so long to figure out nested loops, this step by step breakdown has made it super clear for me, thank you!!
thanks 🙏
I really like how you explained while going through the actual change within each variables.
thank you so much
The idea of step by step explanation is really awesome 🤩🤩 Thank you !!!
Thanks for your feedback 🙂
Very nicely explained, thank you!!
thank you so much
For more details information check this video
ruclips.net/video/qr-WmDy73u8/видео.html
good try. keep it up
Thanks
Thank you for the lesson!!
Explanation is clear 💐❤
Thanks ☺️👍🏻
Your way of explanation is really good brother thank you so much for making these vedeo, its very helpful for all of us.
You are welcome and Thanks
the best explanation ever
Thanks
Explanation is perfect🤓😲
Thank you so much 😀
I love u indian man you are my hero !!!!!!!!!!!!!
Thank you so much for your feedback 😀
Nice, this helped me with my homework. lol
🤣
Excellent sir
Many many thanks
thanks best video for solution
Thanks
i just love you man! thanks!
most welcome 😀
Thankyou so much idol
most welcome
Is it possible to write using while and dowhile loop???
yes
Can u make one fr me plzzz
will do it later, currently not possible. I am away
Ok tq bro
nice bro. Thank for sharing😊
most welcome
What app you use to do these java programs..
Eclipse for java, just search on google
Tq so much🥰
I have a question
outer loop=0
go inner loop j=0
print(*)
update j increment it by one j=1 is 1
hi HC,
the outer foor loop is responsible for total line (from top to buttom)
the inner for loop is responsible for left to right in.
so when j is 1, that means it is greater than 0. So it will call two time.
First j=0 then j=1.
So it will print two star in same line(left to right).
So we are printing star in j(inner loop), so whenever the condition will be satisfied it will print star in inner loop(Yes you are right)
awesomeness
thanks 👍🏻
viva that is useful go ahead and insert video look like this that is clear
i am unable to get your point, can you explain more. Are you talking about video editing?
Thank u so much ❤
you are most welcome
Thank you 🙏 ❤
most welcome
TQ bro 🤗 💫🤩
most welcome
thanks bro
most welcome 😃
I downloaded eclipse!
But I want to know how to get run the program in that
Hi,
just check this
www.javatpoint.com/how-to-run-java-program-in-eclipse
If I give run button - it's coming unable to launch"the selection cannot be launched and there are no recent launches"😩
Hello! First of all I really appreciate this video it really helped so thank you. Second, I have a specific pattern idk if you've done it already.
Glad it was helpful!
Thanks
welcome
SIR ... How to run program step by step For ForLoop I'm Unable to Run Program Like You..... Please Reply 🙏
Hi Nitin,
you have to run the program in debug mode
ruclips.net/video/AP1ZEgkKoeA/видео.html
are this video, and after that put breakpoint and run in debug
@@TalentedDeveloper Ya Sir it's Working Now .... Thank You So Much Sir...🙏
great, 👌
you are most welcome ☺️
thanks po
Great video..... But it is not visible clearly ☹️
ohh, please change the resolution quality. It will be in 1080p
Thanks sir
most welcome
help me.
System.out.print in dart ??
import "dart:io";
stdout.write("foo");
Hello guy! Can u more explain please how to implante "*" from i to j I can't get that part.
Thank you!!!
Hi Cheick,
which part you didn't understand can you explain more?
@@TalentedDeveloper from this time of video 3:10s how did get the stars "*" in "j" I can't understand which command did u use, can u explain more please!!!!
you need to understand after 3:10s??
i am going to explain in detail
@@TalentedDeveloper Yes
how can we print 5 applying the while loop?
54
543
5432
54321
import java.util.Scanner;
public class MainClass {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("How many rows you want in this pattern?");
int rows = sc.nextInt();
System.out.println("Here is your pattern....!!!");
for (int i = rows; i >= 1; i--) {
for (int j = rows; j >= i; j--) {
System.out.print(j + " ");
}
System.out.println();
}
sc.close();
}
}
@@TalentedDeveloper can you tell me the way using while loop
sure, give me some time. I will send you program
import java.util.Scanner;
public class PatternPgm {
public static void main(String args[]) {
int row = 1, column = 1;
int x;
Scanner sc = new Scanner(System.in);
System.out.println("How many rows you want in this pattern?");
int rows = sc.nextInt();
System.out.println("Here is your pattern....!!!");
do {
x = rows;
int printNumber = x;
do {
System.out.print("");
x--;
} while (x >= row);
column = 1;
do {
System.out.print(printNumber + " ");
column++;
printNumber--;
} while (column
@@TalentedDeveloper thank you, I got the output that i want but its difficult for me to understand.
Wow
hmm
How to do this pattern using ABCDE??
public class PatternPgm
{
public static void main(String[] args)
{
int alphabet = 65;
System.out.println("** Printing the pattern... **");
for (int i = 0; i
ABCDE
ABCDA
ABCAB
ABABC
AABCD
How to do please show now
you have to play with code, Just start alphabet from 65.
first understand your output, then write your program.
it is combination of two program
means one structure is
ABCDE
ABCDA
ABCAB
so here
first structure is decreasing from 5, to 4 to 3. And the second structure is appended from A , AB.
I can't write program right now. I will do it later
public class PatternPgm1 {
public static void main(String[] args) {
System.out.println("** Printing the pattern... **");
for (int i = 5; i >= 0; i--) {
int alphabet = 65;
for (int j = 0; j < i; j++) {
System.out.print((char) (alphabet + j) + "");
}
for (int k = 0; k < 5 - i; k++) {
if (i != 0) {
System.out.print((char) (alphabet + k) + "");
}
}
System.out.println();
}
}
}
output
ABCDE
ABCDA
ABCAB
ABABC
AABCD
if you want, you can remove if condition
@@TalentedDeveloper thank you 😊😊
0 q 1 q nhi dale ho plz reply to my question
actually arrays ka index always 0 se start hota, so maximum time for loop bhi 0 se rakha jata.
so agr 1 se start kroge to length me +1 jrur add kar dena.
How can we make *🌟 * shape with star pattren?
which shape? can you explain more
are you taking about to make start design that will fill with *. am I right?
Tqq
most welcome
What is the program in java for pattern like
4 4 4 4 4 4 4
3 3 3 3 3
2 2 2
1
2 2 2
3 3 3 3 3
4 4 4 4 4 4 4
hey @arpan,
first you have to declare a variable size.
then run first decrement loop and also decrement the variable size after then use one increment loop.
try to see the difference here also, like odd number
if you need tomorrow, i can do program
@@TalentedDeveloper if u can do it that will be great for me. Thanks sir
please check this.
talenteddeveloper.co/number-pattern-odd-number-with-pyramid/
You can copy code and you can modify accordingly.
@@TalentedDeveloper it shows service unavailable
I cant see the code its too far
please increase the video quality. Code is already added in description
bro can you copy paste all the codes on this comment please so I can copy it into my java:).
github.com/talenteddeveloper/starPattern
If I give run button - it's coming unable to launch"the selection cannot be launched and there are no recent launches"😩
in left side first select your class.
You can do one thing, ping me on skype
Can u say here only
I don't have skye
no problem,
check my old video
ruclips.net/video/C1IsAYMSa4c/видео.html
ruclips.net/video/h9ngOLu_P5o/видео.html
@@TalentedDeveloper I will check tomorrow that video, now I have net issues
If I have doubt I will clarify tomorrow with u...
Ok, thanks
Get a microphone
sure 😀
LOL bad tutorial
sad to hear