Write java code using bangla font

///Write java code using bangla font

Write java code using bangla font

Well, I faced question regarding uses of bangla in java. So I thought I can try creating some code using bangla font. In the end this is what I got. Surely something similar was done before by someone else. But always its a fun to find out something interesting by yourself.

[java title=”com/kowsercse/বাংলা/ছাত্র.java”]

package com.kowsercse.বাংলা;

public class ছাত্র {
private String নাম;
private String শ্রেণী;

public ছাত্র() {
}

public ছাত্র(String নাম, String শ্রেণী) {
this.নাম = নাম;
this.শ্রেণী = শ্রেণী;
}

public String getনাম() {
return নাম;
}

public void setনাম(String নাম) {
this.নাম = নাম;
}

public String getশ্রেণী() {
return শ্রেণী;
}

public void setশ্রেণী(String শ্রেণী) {
this.শ্রেণী = শ্রেণী;
}

@Override
public String toString() {
return "ছাত্র [নাম=" + নাম + ", শ্রেণী=" + শ্রেণী + "]";
}

}

[/java]

[java title=”com/kowsercse/বাংলা/যাচাইকারী.java”]

package com.kowsercse.বাংলা;

public class যাচাইকারী {

public static void main(String[] args) {
System.out.println("বাংলায় জাভা শিখি");

ছাত্র রাশেদ = new ছাত্র("রাশেদ", "৩য়");
System.out.println(রাশেদ);

রাশেদ.setনাম("রাশেদ আহমেদ");
রাশেদ.setশ্রেণী("তৃতীয়");
System.out.println(রাশেদ);
}

}

[/java]

Here is the output for the above code:
[pre]
বাংলায় জাভা শিখি
ছাত্র [নাম=রাশেদ, শ্রেণী=৩য়]
ছাত্র [নাম=রাশেদ আহমেদ, শ্রেণী=তৃতীয়]
[/pre]
Isn’t it interesting?


Downloads: https://bitbucket.org/kowsercse/experiment

By | 2011-08-30T13:56:45+00:00 August 28th, 2011|java|5 Comments

About the Author:

2 hand 2 leg 2 ear and 2 eyes... i am a man who is living to live...

5 Comments

  1. Tanvir August 28, 2011 at 1:53 PM - Reply

    Nice Article. Hope to get more from You as always…..;))

  2. Dazzle August 29, 2011 at 1:36 AM - Reply

    Interesting…. 😀

  3. Samiron Paul September 3, 2011 at 2:38 PM - Reply

    Really interesting… But probably the same question i will be asking again… Does it really help? in terms of Code readability or Document-ability or anything else…

    Whatever… I believe to have more interesting topics from you.

    • Kowser September 3, 2011 at 3:38 PM - Reply

      “Does it really help?”
      No, it does not. And at least this is not what we should promote to practice.

      However it might be helpful, regarding when anyone teach about OOP or anything like this. If you can learn/write something in your native language it might be helpful. But surely there is much better way to do that.

  4. mahmud faisal September 8, 2011 at 12:19 PM - Reply

    Nice tutorial… *like*

    and this is my first visit to your blog brother! nice to see everything! 😀

Leave a Reply