I have a sequence of English and Arabic text that should be printed in an aligned way.
For example:
List<Character> ar = new ArrayList<Character>();
ar.add('?');
ar.add('?');
ar.add('?');
List<Character> en = new ArrayList<Character>();
en.add('a');
en.add('b');
en.add('c');
System.out.println("ArArray: " + ar);
System.out.println("EnArray: " + en);
Expected Output:
ArArray: [?, ?, ?] // <- I want characters to be printed in the order they were added to the list
EnArray: [a, b, c]
Actual Output:
ArArray: [?, ?, ?] // <- but they're printed in reverse order
EnArray: [a, b, c]
Is there a way to print Arabic characters in left-to-right direction without explicitly reversing the list before output?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…