Book Image

Oracle Certified Associate, Java SE 7 Programmer Study Guide

By : Richard M. Reese
Book Image

Oracle Certified Associate, Java SE 7 Programmer Study Guide

By: Richard M. Reese

Overview of this book

<p>Java SE 7 Associate Programmer certification adds to your qualification as a Java developer. Knowledge of Java is important, but knowing how to write an efficient and productive code adds to your skills and gives you an edge when you are planning to give the certification exam. Coverage of the objectives goes beyond a simple review of certification objectives.</p> <p>"Oracle Certified Associate, Java SE 7 Programmer Study Guide" addresses certification exam objectives and provides discussion and examples to show the best ways of applying Java language features in real world programming. You will gain in-depth understanding of Java by examining how objects are allocated in the heap and how methods are managed in the program stack.<br /><br />"Oracle Certified Associate, Java SE 7 Programmer Study Guide" covers all of the Java SE 7 Associate Programmer certification objectives. It starts with a high level overview of an application’s structure to provide a framework for subsequent chapters. Chapters are organized around common themes with emphasis on memory usage. You will get an in-depth and complete understanding of the run-time Java environment using the illustrations that show the impact of class and method usage on the program stack and heap. <br /><br />Augmenting the coverage of certification objectives are examples of how you can use the classes, methods, and techniques in a productive and sound manner. In addition, sample exam questions are given in each chapter.</p>
Table of Contents (16 chapters)
Oracle Certified Associate, Java SE 7 Programmer Study Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Test your knowledge


  1. 1. Which of the following declares a method that takes a float and an integer returns an array of integers?

    a. public int[] someMethod(int i, float f) { return new int[5];}

    b. public int[] someMethod(int i, float f) { return new int[];}

    c. public int[] someMethod(int i, float f) { return new int[i];}

    d. public int []someMethod(int i, float f) { return new int[5];}

  2. 2. What happens if you try to compile and run the following code:

    public class SomeClass {public static void main(String arguments[]) {
          someMethod(arguments);
       }
       public void someMethod(String[] parameters) {
          System.out.println(parameters);
       }
    }

    a. Syntax error – main is not declared correctly.

    b. Syntax error – the variable parameters cannot be used as it is in the println method.

    c. Syntax error – someMethod needs to be declared as static.

    d. The program will execute without errors.

  3. 3. Which of the following statements about overloaded methods are true?

    a. Static methods cannot be overloaded...