I purchased the e practice exam and don't understand bits of 2 questions in the first practice exam.
QUESTION 4 Exam 1
1. interface Animal {
2. void eat();
3. }
4.
5. // insert code here
6.
7. public class HouseCat extends Feline {
8. public void eat() { }
9. }
abstract class Feline implements Animal { }
-- FIRST OF ALL WHY IS THIS A LEGAL IMPLEMENTATION OF THE interface it doesn't implement the eat() method.
Question 8 Exam 1
Given:
1. class Banana {
2. int x = 1;
3. public static void main(
String [] args) {
4. int x = 2;
5. Banana b = new Banana();
6. b.go();
7. }
8. { x += x; }
9. void go() {
10. ++x;
11. System.out.println(x);
12. }
13. }
Whis is the { x += x; } part of this code snippet legal???
MCPD (Enterprise Application Developer, Windows Developer, Web Developer - .NET 2.0), MCTS (Windows Apps, Web Apps and Disbributed Applications - .NET 2.0), MCITP (Database Developer & Business Intelligence Developer - SQL Server 2005), MCAD, MSCD.net, SCJP 5, SCWCD 1.4, SCBCD, SCMAD, SCDJWS, SCJA