I'm trying to use the following Spanish characters in the command line in NetBeans (using Java):
a á e é i í o ó u ú A Á E É I Í O Ó U Ú Ñ ñ
However when I enter this line, I got the following result:
a � e � i � o � u � A � E � I � O � U � � �
The code I'm using is:
public class SpanishChars {
public static void main (String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter some spanish chars next: ");
String spanishLine = sc.nextLine();
System.out.println("Spanish char entered are next: " + spanishLine);
}
I know it's a NetBeans problem because when I run same program in Eclipse IDE, results are just fine.
Does any one know how to fix it?