java - Using a char when creating a new object -


i have student class need have grade character when creating object. how write in object parameters? if use quotes thinks it's string, , if write grade a, thinks it's variable. parameters are:

string name string adress integer birthdate integer age string course char grade string school  student student1 = new student("john", "random street 1", 891117, 23, "java", a, "hig" ); 

chars wrapped within single quotes '

student student1 =  new student("john", "random street 1", 891117, 23, "java", 'a', "hig" ); 

Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -