Section 4: Language Fundamentals


  • Identify classes that correctly implement an interface where that interface is either java.lang.Runnable or a fully specified interface in the question.

  • State the effect of using a variable or array element of any kind when no explicit assignment has been made to it.

Relevant Sections

Read Sections 2.3 "Variable Declarations" and 2.4 "Initial Values for Variables ." For interface implementation, see Section 6.4 "Interfaces." For implementation of java.lang.Runnable , see Section 9.3 "Thread Creation."

Study Notes

Interfaces can be defined within several contexts, and the contexts influence the meaning of the declaration and the modifiers applicable . The modifiers used also influence the restrictions that apply for the implementation of methods . Certain rules of consistency must be observed when extending or implementing interfaces. Methods are distinguished from each other at compile time, based on the method signature.

Each primitive data type has a range of valid values and a default value. Depending on the context of the declaration, some variables are either initialized to a default value or remain uninitialized until first assigned a value. Code that tries to access uninitialized variables is illegal. Elements of array objects are always initialized.



A Programmer[ap]s Guide to Java Certification
A Programmer[ap]s Guide to Java Certification
ISBN: 201596148
EAN: N/A
Year: 2003
Pages: 284

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net