In this tutorials, we are going write a Java Program For Triangle Part 3 to create a below. This is a Part 3  of the complete example. You can follow the complete 4 parts to complete the entire example.

## Java program for Triangle Part – 3 :

Triangle_Top_LeftToRight.java
``````package com.onlinetutorialspoint.patterns;
import java.util.Scanner;

/*
* *
* **
* ***
* ****
* *****
*/
public class Triangle_Top_LeftToRight {
public static void main(String args[]) {
/* Getting the input from keyboard */
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the size of Triangle");
int size = scanner.nextInt();
for (int i = 1; i <= size; i++) {
for (int j = 1; j <= i; j++) {
System.out.print("*");
}
System.out.println();
}
}
}``````

By running the above Java program, you can get the below shape.

Output :

Terminal
``````
javac  Triangle_Down_RightToLeft.java
java  Triangle_Down_RightToLeft
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.57970595,"math_prob":0.89560604,"size":898,"snap":"2022-27-2022-33","text_gpt3_token_len":219,"char_repetition_ratio":0.1263982,"word_repetition_ratio":0.0,"special_character_ratio":0.29064587,"punctuation_ratio":0.2037037,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9674575,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-12T03:27:41Z\",\"WARC-Record-ID\":\"<urn:uuid:fd9dff2e-532e-42e0-877c-7e57dddee4f3>\",\"Content-Length\":\"180354\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c82a025c-9169-44ad-be83-edf2063f587b>\",\"WARC-Concurrent-To\":\"<urn:uuid:f7b24648-91d1-4117-98a9-5753e84026aa>\",\"WARC-IP-Address\":\"104.21.73.118\",\"WARC-Target-URI\":\"https://www.onlinetutorialspoint.com/java-programs/java-program-for-triangle-part-3.html\",\"WARC-Payload-Digest\":\"sha1:R4ZWEMUZKS3GVWJBAC2KUJGMLGIEO75V\",\"WARC-Block-Digest\":\"sha1:EWQ7OIBF4IX2AXBG2EGEDW2KX3TB4LVD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571538.36_warc_CC-MAIN-20220812014923-20220812044923-00503.warc.gz\"}"}