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.
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 "ছাত্র [নাম=" + নাম + ", শ্রেণী=" + শ্রেণী + "]";
}
}
package com.kowsercse.বাংলা;
public class যাচাইকারী {
public static void main(String[] args) {
System.out.println("বাংলায় জাভা শিখি");
ছাত্র রাশেদ = new ছাত্র("রাশেদ", "৩য়");
System.out.println(রাশেদ);
রাশেদ.setনাম("রাশেদ আহমেদ");
রাশেদ.setশ্রেণী("তৃতীয়");
System.out.println(রাশেদ);
}
}
Here is the output for the above code:
বাংলায় জাভা শিখি ছাত্র [নাম=রাশেদ, শ্রেণী=৩য়] ছাত্র [নাম=রাশেদ আহমেদ, শ্রেণী=তৃতীয়]
Isn’t it interesting?
Downloads: https://bitbucket.org/kowsercse/experiment