Java & OO Intermediate - Part 1

Associations
  • Write Java code that implements an association
    • unique with an object reference
    • multiple with a collection or array of references
  • Instantiate objects and bind them to each other through associations.
  • Navigate through an object graph.
  • From a given code fragment, identify the instances created in memory and their relationships.
ArrayList
  • Write code that uses an ArrayList to store and read a list of elements
  • Define a reference to an ArrayList of a specific type (as an ArrayList of Strings).
  • Instantiate an ArrayList, and add elements to it.
  • Get the amount of elements in an ArrayList.
  • Import the appropriate package to use an ArrayList.
Array
  • Define a single dimension array of a given size, for primitive type elements or objects. Use the brackets {} to initialize it.
  • Retrieve any element of an array from its position.
  • Determine the size (amount of elements) of a given array.
  • Manipulate the array argument of the main method to extract individual arguments.
For Each
  • Iterate through all the elements of an ArrayList or an array with a for each construct.
Scanner
  • Read a text file line by line.
  • Extracts numbers from a String
  • Handle the appropriate exceptions
  • Import the appropriate package
PrintWriter
  • Create a text file and append lines to it.
  • Close the PrintWriter correctly.
  • Handle the appropriate exceptions
  • Import the appropriate package
Date
  • Understand that Date is an immutable non primitive type.
  • Use GregorianCalendar to extract basic information form a Date and to set a Date to a specific day.
  • Use SimpleDateFormat to convert a String into a Date and vice versa.
  • Import the appropriate package
Strings Manipulations
  • Make a basic usage of Scanner and StringTokenizer to split a string into strings and into numeric primitives.
  • Use trim to remove the blank spaces around a string.
  • Convert a String into an int.
Wrappers
  • Given a primitive type, identify its wrapper class.
  • Know that wrappers are immutable.
  • Create a wrapper and extracts its primitive value.
  • Identify basic usage of autoboxing from a code fragment.
Jars and ClassPath
  • Know that jar files contain java source and/or compiled code.
  • Know that to use a class from a jar file, you need to add the jar file to your classpath.
  • Identify cases where the class definition is unreachable by the compiler because the jar file is not in the compiler's classpath.
This exam excludes configuring an IDE or the java command line. JavaDoc
  • Understand from what source the JavaDoc html files are produced.
  • Write appropriate comments that will be taken by the JavaDoc system.
Collections
  • Identify the main behavioral differences between a List, a Set and a Map.
  • Perform basic operations correctly on an ArrayList, a HashSet and a HashMap:
    • add an item
    • remove a specific item
    • check if an item is contained in the collection
    • get the size of the collection
    • clear the collection.
Not covered: requirements for implementing the hashCode and equals methods. Exceptions
  • Differentiate runtime and checked exceptions.
  • Instantiate and throw a RuntimeException.
  • Catch a checked exception with a try/catch/finally statement.
  • Use the throws clause to ignore an exception.
  • From a given code fragment, identify a compilation problem that a checked exception has not been handled.

你可能感兴趣的:(java,OO,ide)