How do I display the rupee symbol in my java class?
5 answers
Your problem doesn’t seem to be that important for the comparison part of this snippet, but is mainly related to printing, to display that characters are correctly wrapped System.out
in OutputPrintWriter
with UTF-8 encoding, which is the configuration needed on some OSs:
OutputStreamWriter stdOut=new OutputStreamWriter(System.out,"UTF8");
stdOut.println("₹");
+2
source to share