//8. Experiment with the below code. When would you use this data type? // In Java "or" is represented by || and "and" is represented as && //boolean x = 0; //boolean x = true; //x = !x; //x = x || false; //System.out.println(x);
Please explain the questions below.
//8. Experiment with the below code. When would you use this data type?
// In Java "or" is represented by || and "and" is represented as &&
//boolean x = 0;
//boolean x = true;
//x = !x;
//x = x || false;
//System.out.println(x);
//9. Explain what's going on here.
//char x = 'A';
//char x = 65;
//char x = 'A'; x++;
//char x = 12;
//System.out.println("x = " + x);
Step by step
Solved in 2 steps