with regard to the last data conversion, if the definition is short, then s=s+1, this is wrong, will lose precision, but if it is s+=1. true, because it contains a forced conversion inside. Equivalent to s= (int) (s+1); And then specifically see the difference between && and &, in java,&& in the judgment if the following is false, then the following conditions are not executed, such as a++&&b++; if the a++ result is 0, Then the subsequent code is not executed, because the result is wrong regardless of what is later Returned. &, on the other hand. Ternary operator, format (relational expression)? Expression 1: expression 2; if true, expression 1 is the Result. if false, the expression 2 is the Result. Finally is about the keyboard input, about those if while and so on and C C + + looked at the next, about the keyboard entry, first, is the guide package, so that I can use the input function, import java.util.Scanner; then create the object in class Scanner sc = new Scanner (system.in); Gets the data int x = Sc.nextint (); The final output is Ready.
Third day of Java learning