KnowledgeBoat Logo

Java Pattern Programs

  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1   2   3   4   5
    6   7   8   9
    10 11 12
    13 14
    15

    View Answer

    40 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    15 14 13 12 11
    10 9 8 7
    6 5 4
    3 2
    1

    View Answer

    51 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1
    1 0
    1 0 1
    1 0 1 0
    1 0 1 0 1

    View Answer

    55 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    5 5 5 5 5
       4 4 4 4
          3 3 3
             2 2
                1

    View Answer

    34 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1 2 3 4 5
    2 2 3 4 5
    3 3 3 4 5
    4 4 4 4 5
    5 5 5 5 5

    View Answer

    33 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern for n number of rows (take n as input from user):

    Enter number of rows: 5
    abcdedcba
    abcdedc
    abcde
    abc
    a

    View Answer

    12 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    A
    AB
    ABC
    ABCD
    ABCDE

    View Answer

    22 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

        A
       AB
      ABC
     ABCD
    ABCDE
    

    View Answer

    15 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    Exam
     xam
      am
       m
    

    View Answer

    16 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    bo
    tt
    le
    s
    


Showing 21 - 30 of 87 Questions