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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -