My understanding of strongly typed was that the language wouldn’t make implicit type conversions. However, this code converts the char to it’s ascii value and then uses that value.

static char x = 'j';
static int y = 7;

public static void main(String[] args){
    System.out.println(y+x);
}

Leave a Reply

Your email address will not be published. Required fields are marked *