📚 Practice Mode

Programming Language Concepts and History

Learn at your own pace with hints and detailed explanations

1 / 16
Multiple Choice

What is the result of the following code? 1. public class Drink { 2. private int millis = 200; 3. boolean carbonated = false; 4. 5. public static void main(String [] args) { 6. System.out.println(new AppyFizz()); 7. } 8. } 9. class AppyFizz extends Drink { 10. public String toString() { 11. return millis + " " + carbonated; 12. } 13. }

  1. 12 false
  2. Compiler error on line 6
  3. Compiler error on line 12
  4. Compiler error on line 11