Greetings:
I was doing Marcus Green's Mock Exam # 2 and question #28 is as follows:
public class As{
int i = 10;
int j;
char z= 1; //**This line is what I have a question about**
boolean b;
public static void main(
String argv[]){
As a = new As();
a.amethod();
}
public void amethod(){
System.out.println(j);
System.out.println(b);
}
}
I assumed there would be a compiler error becaucse I was under the impression that char primitives had to be initilized using single quotes ( '' ). Unfortunately, I have not been able to find much documention on this, only the Character class. Please let me know what are valid initializers for the char primitive.
Thank you
B Barnett