Java Advanced - Course Exam

Print the objectives

Take the exam   Take a beta test

This exam covers the content of the Java Advanced course.
  Released  Beta  Frozen  

Primitive Types  2 questions

Types
  • For each Java primitive type explain its purpose, its default value, its value range
Literals
  • For the char literals, explain the meaning of \u, \n, \t, \', \" literals
  • For the integral literals, only the decimal notation is covered (neither octal nor hexadecimal)
  • For the floating point literals
    • explain the meaning of the e, f, d suffixes
    • use the Float/Double.NaN, .NEGATIVE_INFINITY, .POSITIVE_INFINITY constants
  • Use the L(l) suffix to get a long literal instead of an int
Conversion
  • Explain the widening conversion chain byte -> short -> int -> long -> float -> double
  • Given code, spot valid and invalid primitive types casting operations
6 30 5

Flow Control  2 questions

Create Loops
  • Write code using all kind of Java loops : for, while, do-while and for each (introduced in Java 5)
  • Predict behavior of nested loops
  • Use break and continue in nested loops, both unlabeled and labeled syntaxes.
Define Branching
  • Write syntactically correct tests using if, switch structures
  • Define correct types of arguments for both keywords
5 40 5

Ternary Operator  2 questions

  • Use correct syntax and explain the ternary x ? y : z operator
  • Identify correct operands and return type compatibility
6 12 2

static  3 questions

  • Write code that defines class attributes using the static keyword and manipulate them
  • Define class method, explain how to call them
6 9 10

final  2 questions

  • Explain how to define constant attributes using final
  • Identify places where blank final can be initialized
  • Describe the meaning of final applied to methods
  • Prevent classes from being subclassed by declaring them final
6 19 0

Class Loading  2 questions

  • Explain the Java SE classpath mechanism
  • Understand the ClassLoader hierarchy and implications on the static scope.
  • Given an object instance get its ClassLoader from its Class
  • Get the system classloader using ClassLoader.getSystemClassLoader()
  • Write code that uses ClassLoader to load external resources on the file system.
4 0 3

Lifecycle  3 questions

  • Understand the new operator to create an object.
  • Determine the initialization sequence of fields, static fields, static block, constructor, ancestor constructors
  • Explain the use of this() and super() in constructors and identify where you can call them
8 6 2

Overloading  3 questions

  • Explain the overloading mechanism
  • Identify the method name, arguments types and order differentiates 2 method signatures
  • Explain why the return type does not differentiate 2 methods
  • Given code, determine method resolution behavior when using polymorphism in parameters including Java 5 Autoboxing and varargs
5 4 4

Inner Classes  3 questions

  • Write code that define basic inner classes (anonymous or not)
  • Explain the usage of the outer class "this", in the inner class
  • Use final modifier for local variables in enclosing classes to get access to it
5 20 5

Annotations  3 questions

An introduction from IBM to Annotations is here.
The definition of Annotations can be found in chapter 9.6 & 9.7 of the Java Language Specification and in the description of the java.lang.annotation package.

  • Identify code that use Annotations.
  • Create code that use standard Annotations.
  • Develop custom Annotations.
  • Explain the advantages of Annotations.
  • Describe what marker annotations and meta-annotations are and how to use them.


Not covered: EJB 3 specific things!

6 19 3

Generics  3 questions

The Generics Tutorial from Sun covers the basic knowledge that is necessary for this category.
  • Create code that uses Generics.
  • Describe the benefits of Generics.
  • Develop code which deals with legacy code that is not generified.
7 31 7

Enums  3 questions

  • Identify the goals of Typesafe Enums.
  • Create enum constructors and explain how to create Enums.
  • Write code that shows the correct and incorrect usage of Typesafe Enums.
  • Use the methods in enums.
  • Work with EnumSet and EnumMap.
6 14 3

Exceptions  3 questions

  • Create and throw a custom exception class.
  • Use the throws keyword.
  • Know the java standard exception hierarchy for: Throwable, Error, OutOfMemoryError, Exception, RuntimeException, NullPointerException, IOException...
  • Understand execution flow for nested try/catch/finally clauses.
  • Understand and use nested exceptions.
  • Differentiate checked and unchecked exceptions.
7 19 5

Exam information

  • 51 minutes
  • 34 questions (354)
  • 75% required
  • +10 √
  • - 20  points
  • 15 day delay
  • status: released