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
Post a Comment