Apply Your Knowledge

Review Questions

1:What is the difference between a field variable and a local variable?
2:What is the difference between static and non-static variables?
3:How are this and super used?
4:What is a void return type?
5:If a class is declared without access modifiers, where can the class be accessed?
6:If a variable is declared as private, where can the variable be accessed?
7:If a method is declared as protected, where can the method be accessed?
8:What is an abstract method?
9:What is a native method?
10:What is a transient variable?

Exam Questions

1:What is the output of the following program?
 class Question extends SuperClass { String s = "this"; public static void main(String[] args) { new Question(); } Question() { super.display(s); ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.