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

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

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -