The Follwing code will result in a compiler error. Why? class Test { void doStuff() { private int x = 7; this.doMore(x); } }

  1. The use of This; local to a function is illegal

  2. Access modifiers can not be applied to local variables

  3. All classes must be declared public

  4. None of these


Correct Option: B

Find more quizzes: