With x = 0, which of the following are legal lines of Java code for changing the value of x to 1? 1. x++; 2. x = x + 1; 3. x += 1; 4. x =+ 1;

🎲 Try a Random Question  |  Total Questions in Quiz: 80  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Core Java — practice the complete quiz, review flashcards, or try a random question.


With x = 0, which of the following are legal lines of Java code for changing the value of x to 1? 1. x++; 2. x = x + 1; 3. x += 1; 4. x =+ 1;