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


  • 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

    12 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


  • 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


  • 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


  • 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


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    A
    AB
    ABC
    ABCD
    ABCDE


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

        A
       AB
      ABC
     ABCD
    ABCDE
    


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    Exam
     xam
      am
       m
    


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    bo
    tt
    le
    s
    


Showing 21 - 30 of 87 Questions