0
我試圖使用下面的代碼顯示盧比符號。但in output I'm getting a box symbol instead of rupee如何在java中打印印度盧比符號
public class Applet extends JApplet {
public static final String RUPEE = "\u20B9";
public void init() {
setLayout(new FlowLayout());
JLabel b = new JLabel("rupee : " + RUPEE +123);
b.setFont(new Font("Arial", Font.PLAIN, 14));
add(b);
}
}
改變編碼格式看看這個http://www.rgagnon.com/javadetails/java-0136.html – Zia
這在macOS上正常工作。很可能您使用的字體不包含該字符。 –
謝謝,它更新後工作正常 – naresh