
But thou, when thou prayest, enter into thy closet, and when thou hast shut thy door, pray to thy Father which is in secret; and thy Father which seeth in secret shall reward thee openly. Matthew 6:6
Jesus prayed aloud on the cross.
Matthew 27:46 And about the ninth hour Jesus cried with a loud voice, saying, Eli, Eli, lama sabachthani? that is to say, My God, my God, why hast thou forsaken me? 27:47 Some of them that stood there, when they heard that, said, This man calleth for Elias.
He also prayed publicly at the tomb of Lazarus.
John 11:41 Then they took away the stone from the place where the dead was laid. And Jesus lifted up his eyes, and said, Father, I thank thee that thou hast heard me. 11:42 And I knew that thou hearest me always: but because of the people which stand by I said it, that they may believe that thou hast sent me.
What Jesus condemned was ostentatious and pretentious prayers, not loud prayers, or open prayers of public interest.
