I'm having trouble getting the £ sign to show properly in the command prompt after doing:
System.out.println("The price from x to y is £4");
When executed in the command prompt it reads : The price from x to y is ú4
I'm having trouble getting the £ sign to show properly in the command prompt after doing:
System.out.println("The price from x to y is £4");
When executed in the command prompt it reads : The price from x to y is ú4
You need to supply a Unicode value in the string for the pound symbol.
You should do:
System.console().writer().println("The price from x to y is \u00A34");
See this page for more information.
See also this question.