java - Print a range of characters as a list -



java - Print a range of characters as a list -

so method supposed take character parameters first , lastly characters in range , print every letter , numerical encoding in range. illustration e , j parameters print out e f g h j (except nnumerical encoding) code used doesnt compile. doing wrong

public void listcharactercodes(char a, char b){ int j = (int) b; for(int =(int) a, i<j,i++){ println("'" + + "': " + i); } }

do this:

public static void listcharactercodes(char a, char b){ for(int =a; i<b;i++){ system.out.println((char)i +"--"+ i); } }

java

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -