Java SE Base API - Basic

Print the objectives

Take the exam   Take a beta test

This exam contains the obvious things you need to start writing simple programs. Basic usage of the following classes and packages.
  Released  Beta  Frozen  

Wrappers for primitive types

Create and use the wrapper classes:

  • java.lang.Boolean
  • java.lang.Byte
  • java.lang.Character
  • java.lang.Double
  • java.lang.Float
  • java.lang.Integer
  • java.lang.Long
  • java.lang.Short

Not covered: Autoboxing / Unboxing

 
 

Construction  1 question

  • Discuss that the wrappers are immutable and the consequences of that.
  • Develop code that demonstrates how to get an instance of a wrapper.
19 72 72

Convenience Methods  1 question

  • Create code that shows the conversion from a wrapper to a primitive and back to a wrapper.
  • Write code that gets a primitive value from a wrapper instance.
  • Write code that gets a wrapper instance from a primitive value.
14 60 33

Dates and Calendar

Work with the following classes to handle dates and time:

  • java.util.Date
  • java.sql.Time
  • java.util.Calendar
  • java.util.GregorianCalendar

Not covered: TimeZone, DateFormat (these questions are in the Format section), all the special things about the GregorianCalendar.

 
 

Date  1 question

  • Recognize the deprecated constructors and methods of Date and know which methods should be used instead.
  • Create code that uses a Date.
  • Write code that uses System.currentTimeMillis() to get the current time.
15 3 41

Calendar  1 question

Develop code that uses the different add() and set() methods to manipulate calendar fields.
18 3 39

Format

Convert date, decimal, and integer to and from a String using the following classes:

  • java.text.Format
  • java.text.DateFormat
  • java.text.SimpleDateFormat
  • java.text.NumberFormat
  • java.text.DecimalFormat

Not covered: java.util.Formatter, thread safe handling

 
 

DateFormat  1 question

  • Show the basic usage of the SimpleDateFormat.
  • Develop code that uses SimpleDateFormat to parse and format dates.
13 14 44

NumberFormat  1 question

  • Use the DecimalFormat to format numbers.
  • Create code that uses DecimalFormat to format numbers in different notations (scientific, fixed-point, integer,...).
  • Create patterns and use them to format numbers.
12 3 24

Math  1 question

The basic usage of the java.lang.Math class.

  • Create code that uses the min() and max() methods.
  • Use the random() method.
  • Discuss and use the round(), ceil() and floor() methods.

Not covered: Methods and/or values of sin, cos, tan, log, ...

24 75 37

String Manipulation

Discuss the basic usage of the following classes:

  • java.lang.String
  • java.lang.StringBuffer
  • java.util.StringTokenizer

A good introduction to the String Literal Pool (or sometimes called String Constant Pool) can be found here.

Not covered: StringBuilder, Scanner, printf()

 
 

String  2 questions

  • Discuss that Strings are immutable and the implications of that.
  • Write code that uses these String methods:
    • equalsIgnoreCase and equals
    • indexOf
    • length
    • toLowerCase and toUpperCase
    • trim
28 302 64

StringBuffer  2 questions

  • Discuss the appropriate use of StringBuffer and know that it is synchronized.
  • Create code that uses the different StringBuffer constructors (default constructor, with capacity, with String).
  • Write code using the StringBuffer methods (append(), insert()).

Not covered: Special StringBuffer methods like codePointXXX(), appendCodePoint(), lastIndexOf(), ensureCapacity(), ...

47 65 44

StringTokenizer  2 questions

  • Create code that uses the different StringTokenizer constructors.
  • Develop code that tokenizes a string and makes use of the StringTokenizer methods (countTokens(), hasMoreElements(), hasMoreTokens(), nextElement(), nextToken()).
25 0 35

Regular Expression  1 question

The very basic use of Regular Expressions is required for this category.
  • Identify the special characters used by Regular Expressions.
  • Write code that matches a file extension (e.g. txt)
12 6 50

Exam information

  • 21 minutes
  • 14 questions (1313)
  • 80% required
  • +2 √
  • - 8  points
  • 15 day delay
  • status: released

Exam leader

Top contributors