Print a Hindi Text( ππ Jai Shree Ram Bhajan : Shree RamChandra Kripaluππ) on Console in Java Programming by using Eclipse IDEπ₯π₯
This post shows how to code in JAVA to print a Hindi Text in Java Languageπ
Note: This Java Program/Code is Written in Eclipse IDE
Program Name : JaiShriRam
![]() |
JaiShriRam Program Output |
VERY IMPORTANT NOTE : To execute Hind Text, You Will select UTF-8 encoding
Window > Preferences > General > Content Types
, set UTF-8 as the default encoding for all content types.The Complete map of this program are as ππ
1. Arrays of ASCII values (Hindi/English Text)[Hindi Unicode]
2. Access each element of Arrays Using for loop till Arrays length
3. Uses of sleep method
e.g: for(int i =0 ;i< h.length;i++) {
System.err.print(h[i]);//
Thread.sleep(50);
}
System.err.print(h[i]);//
Thread.sleep(50);
}
The complete code of this program is hereπ
public class JaiShriRam {
public static void main(String aa[]) throws InterruptedException {
//Array of hindi text
char h[]={10,32,32,32,32,32,124,124,32,32,2332,2351,32,2358,2381,2352,2368,32,2352,2366,2350,32,32,32,32,124,124,32,32, 2358,2381,2352,2368,32,32,2352,2366,2350,2330,2344,2381,2342,2381,2352,32,32,2325,2371,2346,2366,2354,2369,32,32,124,124,10,10};
//Array of hindi text
char h1[] = {32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2358,2381,2352,2368,2352,2366,2350,2330,2344,2381,2342,2381,2352,32,
2325,2371,2346,2366,2354,2369,32,2349,2332,2369,32,2350,2344,32,2361,2352,2339,32,2349,2357,2349,2351,32,2342,2366,2352,2369,2339,2350,2381,32,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2344,2357,2325,2334,2381,2332,32,2354,2379,
2330,2344,32,2325,2334,2381,2332,32,2350,2369,2326,2325,2352,32,2325,2334,2381,2332,2346,2342,32,2325,2334,2381,2332,
2366,2352,2369,2339,2350,2381,32,46,46,32,2407,46,46,10,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
2325,2306,2342,2352,2381,2346,32,2309,2327,2339,2367,2340,32,2309,2350,2367,2340,32,2331,2348,2367,32,2344,2357,32,2344,
2368,2354,32,2344,2368,2352,2332,32,2360,2369,2344,2381,2342,2352,2350,2381,32,46,10,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,2346,2335,2346,2368,2340,32,2350,2366,2344,2361,2369,2306,32,2340,2396,2367,2340,
32,2352,2369,2330,2367,32,2360,2369,2330,2367,32,2344,2380,2350,2367,32,2332,2344,2325,32,2360,2369,2340,2366,2357,
2352,2350,2381,32,46,46,32,2408,46,46,10,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2349,2332,2369,32,2342,
2368,2344,32,2348,2344,2381,2343,2369,32,2342,2367,2344,2375,2358,32,2342,2366,2344,2357,32,2342,2376,2340,2381,
2351,2357,2306,2358,2344,2367,2325,2344,2381,2342,2344,2350,2381,32,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,
32,32,2352,2328,2369,2344,2344,2381,2342,32,2310,2344,2306,2342,2325,2306,2342,32,2325,2379,2358,2354,32,2330,2344,
2381,2342,32,2342,2358,2352,2341,32,2344,2344,2381,2342,2344,2350,2381,32,46,46,32,2409,46,46,10,10,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2360,2367,2352,32,2350,2369,2325,2369,2335,32,2325,
2369,2339,2381,2337,2354,32,2340,2367,2354,2325,32,2330,2366,2352,2369,32,2313,2342,2366,2352,32,2309,2329,2381,
2327,32,2357,2367,2349,2370,2359,2339,2350,2381,32,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
32,32,2310,2332,2366,2344,2369,2349,2369,2332,32,2360,2352,32,2330,2366,2346,2343,2352,32,2360,2329,2381,2327,
2381,2352,2366,2350,32,2332,2367,2340,32,2326,2352,2342,2370,2359,2339,2350,2381,32,46,46,32,2410,46,46,10,10,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2311,2340,2367,32,2357,2342,2340,2367,32,2340,2369,2354,2360,2368,
2342,2366,2360,32,2358,2329,2381,2325,2352,32,2358,2375,2359,32,2350,2369,2344,2367,32,2350,2344,2352,2334,2381,
2332,2344,2350,2381,32,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,2350,2350,32,2361,2371,2342,2351,2325,
2334,2381,2332,32,2344,2367,2357,2366,2360,32,2325,2369,2352,2369,32,2325,2366,2350,2366,2342,2367,2326,2354,2342,
2354,2350,2334,2381,2332,2344,2350,2381,32,46,46,32,2411,46,46,10,10,91,32,67,114,101,100,
105,116,32,32,169,32,80,114,111,103,114,97,109,50,68,99,111,100,101,32,124,124,32,169,32,65,75,77,32,93,10,10};
//Array of english text
char e[] = {10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,124,124,32,32,74,65,73,32,83,72,82,69,69,32,82,65,77,32,32,124,
124,32,32,83,104,114,101,101,32,82,97,109,67,104,97,110,100,114,97,32,75,114,105,112,97,108,117,32,32,124,124,10,10}; //Array of english text
char e1[]= {32,32,32,32,32,32,32,32,32,32,83,104,114,105,32,82,97,109,97,99,97,110,100,114,97,32,107,114,105,112,97,108,
117,32,98,104,97,106,117,44,32,109,97,110,97,44,32,104,97,114,97,110,97,32,98,104,97,118,97,32,98,104,97,121,97,32,100,97,114,117,110,97,109,46,46,10,32,32,32,32,32,32,32,32,32,32,110,97,118,97,107,97,110,106,97,45,108,111,
99,97,110,97,32,107,97,110,106,97,45,109,117,107,104,97,44,32,107,97,114,97,45,107,97,110,106,97,32,112,97,100,
97,45,107,97,110,106,97,114,117,110,97,109,46,32,46,46,46,49,10,10,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,75,97,110,100,97,114,112,97,32,97,103,97,110,105,116,97,32,97,109,
105,116,97,32,99,104,97,118,105,44,32,110,97,118,97,108,105,110,97,32,110,105,114,97,106,32,115,117,110,100,97,
114,97,109,46,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,97,116,97,112,105,116,97,32,109,97,110,97,
104,117,32,116,97,114,105,116,97,32,114,117,99,104,105,32,115,117,99,104,105,44,32,110,97,117,109,105,32,74,97,
110,97,107,97,45,115,117,116,97,118,97,114,97,109,46,32,46,46,46,50,10,10,
32,32,32,32,32,32,32,32,32,32,66,104,97,106,117,32,68,105,110,97,98,104,97,110,100,117,32,68,105,110,101,115,
104,97,32,100,97,110,97,118,97,45,100,97,105,116,121,97,45,118,97,110,115,104,97,32,110,105,107,97,110,100,97,
110,97,109,46,46,10,32,32,32,32,32,32,32,32,32,32,82,97,103,104,117,110,97,110,100,97,32,97,110,97,110,100,97,
107,97,110,100,97,44,32,75,97,117,115,104,97,108,97,99,97,110,100,97,32,68,97,115,104,97,114,97,116,104,97,45,
110,97,110,100,97,110,97,109,46,32,46,46,46,51,10,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,105,114,
97,32,109,117,107,117,116,97,32,107,117,110,100,97,108,97,32,116,105,108,97,107,97,32,99,97,114,117,44,32,117,
100,97,114,117,32,97,110,103,97,32,118,105,98,104,117,115,104,97,110,97,109,46,46,10,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,97,106,97,110,117,32,98,104,117,106,97,32,115,104,97,114,97,99,97,112,97,32,100,104,97,
114,97,44,32,115,97,110,103,114,97,109,97,45,106,105,116,97,32,75,104,97,114,97,45,68,104,117,115,104,97,110,
97,109,46,32,46,46,46,52,10,10,32,32,32,32,32,32,32,32,32,32,73,116,105,32,118,97,100,97,116,105,32,84,117,108,
97,115,105,100,97,115,97,32,83,104,97,107,97,114,97,44,32,83,104,101,115,104,97,32,109,117,110,105,109,97,110,
97,32,114,97,110,106,97,110,97,109,46,46,10,32,32,32,32,32,32,32,32,32,32,109,97,109,97,32,104,114,105,100,97,
121,97,45,107,97,110,106,97,32,110,105,118,97,115,97,32,107,117,114,117,44,32,107,97,109,97,100,105,32,107,104,
97,108,97,100,97,108,97,32,103,97,110,106,97,110,97,109,46,32,46,46,46,53,10,10,32,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,91,32,67,114,101,100,
105,116,32,32,169,32,80,114,111,103,114,97,109,50,68,99,111,100,101,32,124,124,32,169,32,65,75,77,32,93,10,10};
for(int i =0 ;i< h.length;i++) {
System.err.print(h[i]);
Thread.sleep(50);}
for(int i =0 ;i< h1.length;i++) {
System.out.print(h1[i]);
Thread.sleep(50);
}
for(int i =0 ;i< e.length;i++) {
System.err.print(e[i]);//System.out.print(e[i]);
Thread.sleep(50);
}
for(int i =0 ;i< e1.length;i++) {
System.out.print(e1[i]);
Thread.sleep(50);
}
}
}
System.err.print(h[i]); - This statement is written for only to use the Console err text color of Eclipse IDE. Otherwise,
You can simply use System.out.print(h[i]); instead of System.err.print(h[i]);
Follow Program2Dcode on
0 Comments
if you have any doubts, Please let me know.