66 Java Patterns Numeric Diamond Part 1 |

Java

Video is ready, Click Here to View ×


Launch Your First Android app with our TOP course at 82% OFF (24 hrs ONLY) HERE https://goo.gl/7veBXc
“Learn How To Design + Code A Complete App From Scratch To Playstore”
➨ https://www.youtube.com/watch?v=aWGGZCOHZ1k
-~-~~-~~~-~~-~-

This video shows the most complex Java Pattern which is a diamond with numbers
1
212
32123
212
1

47 thoughts on “66 Java Patterns Numeric Diamond Part 1 |

  1. package ForLoopsAll;

    public class Triangle {
    public static void main(String args[])
    {
    int sp =4,sc =1;
    for(int i=1;i<=5;i++)
    {
    // System.out.println();
    for (int j=1;j<=sp;j++)
    {
    System.out.print(" ");
    }
    for(int k=1;k<=sc;k++)
    {
    System.out.print("*");
    }
    sp–;
    sc = sc+2;

    System.out.println();
    }
    int spc =1,sv = 7;
    for(int i=1;i<=5;i++)
    {
    for(int j=1;j<=spc;j++)
    {
    System.out.print(" ");
    }
    for(int k=1;k<=sv;k++)
    {
    System.out.print("*");
    }
    spc=spc+1;
    sv = sv-2;
    System.out.println();

    }
    }
    }
    Output :

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

  2. package ForLoopsAll;

    public class Triangle {
    public static void main(String args[])
    {
    int sp =4,sc =1;
    for(int i=1;i<=5;i++)
    {
    for (int j=1;j<=sp;j++)
    {System.out.print(" ");}

    for(int k=1;k<=sc;k++)
    {System.out.print("*");}

    sp–;
    sc = sc+2;
    System.out.println();
    }
    }
    }

    Output :

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

  3. hello sir, i used to watched your every videos ,really its very nice and the way you explained anybody can understand.
    Sir, I got a job as programmer in MNC company which is located in Bangalore .I am not so much good in programming .
    So my question is that if I will work there , will be easy for me or very tough. I am doing my mca from bangalore which in india.

  4. Thank you slidenerd for posting such easiest way of understanding printing pattern programs. I have another program for triangle pattern which is very difficult for me. output should be              

        g               
      gog             
     gooog           
    ggggggg

     Inner triangle with letter o and outer triangle woth letter g and so on… please explain above program asap.

  5. I think I'm missing a step….my output is set to just vertical, so when entering      for(int j=1;j<=3;j++)
          {
                    System.out.println("*");
        }
        
    }
    }

    I get 3 stars but vertically and not horizontally. Please help!

  6. I love it .
    Couldn't teach a college in this pattern .
    I understand what you say the code.
    Thank you .i realY very impress to you.

    But which types of software used.

    I used to jdk1.8.0_25 that is a DOS.

  7. how do you print , when i use your method to print k, it only work until the ascending part of the diamond, 
            1
           131
          13531
         1357531
        135797531
         1357531
          13531
           131
             1

  8. i have a problem which is if i want to choose anynumber from 1 to 12 i tried to do it by following your video but i can't for example
    Enter an integer from 1 to 12:
    3

    3
    33
    333
    33
    3

  9. @Tim Forsyth 😀 thank you very much , I am happy you and the others are learning something more than just syntax which gives me the impression that my channel s meeting its goals from time to time 😀

  10. @SuperXena80 glad you understood it 😀 the main idea behind the whole channel was to make people understand code more than teach how to write the syntax 😀 and hopefully its working to some extent atleast 😀

  11. hi @Nithin Sai, thanks 🙂 feel free to share these with your friends and colleagues who are struggling to learn these things, hope you dont mind those pesky ads bcoz they are the only way i sustain myself 🙂 thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *