Java SE - Basic
The Java SE - Basic exam covers what most developers having some Java experience certainly know, with no extra study effort.
Together with the OO for Java - Basic exam, it is the entry point for new users to get a yellow belt (the first belt after the initial white belt).
Concepts or APIs which are covered by this basic level are also covered by other Java SE exams. For example, we cover basic inheritance here, and more inheritance at the Java SE Core - Intermed level. Harder questions about collections can be found in the Java SE Collections exam.
Note to the question authors: if you wonder if your question is too hard for this exam, it usually is. Please put it in another exam.
The questions assume that you have the following prerequisites:
Together with the OO for Java - Basic exam, it is the entry point for new users to get a yellow belt (the first belt after the initial white belt).
Concepts or APIs which are covered by this basic level are also covered by other Java SE exams. For example, we cover basic inheritance here, and more inheritance at the Java SE Core - Intermed level. Harder questions about collections can be found in the Java SE Collections exam.
Note to the question authors: if you wonder if your question is too hard for this exam, it usually is. Please put it in another exam.
The questions assume that you have the following prerequisites:
- Use basic programming notions, as "procedures", variables, nested loops,...
- Have a basic understanding of OO (equivalent to the OO for Java - Basic exam).
- Use the System.out.println() method to output strings at the console.
| Released | Beta | Frozen | ||
|---|---|---|---|---|
Java Objects
Define and instantiate classes.
|
|
|||
Object 1 question
From a code fragment, predict the behaviours of reference usage. Understand that a reference to an object is like a pointer, and changing the value of a reference does not affect the object it pointed to.
Use the base JavaBeans vocabulary and concepts: property, accessor/mutator, getter/setter. By JavaBean, we mean simple POJO with getters and setters, NO EJB (Enterprise JavaBean). NOT covered: OO oriented questions (these are for the OO exams), more advanced Javabeans techniques such as property listeners. |
28 | 327 | 197 | |
Class 2 questions
Write a basic .java file to define a class, declaring the package and the imports correctly.
Use the default constructor, or write a constructor. NOT covered: class loading, interfaces, abstract classes. Use the correct Java syntax for using basic inheritance. Write a class that inherits from another class with the extends keyword. Know that java.lang.Object is the ultimate ancestor. Write expressions that upcast or downcast a reference (no tricks, no arrays). NOT covered: interfaces, abstraction, overriding, super (for the next level). |
12 | 562 | 108 | |
Method and Attribute 2 questions
Define instance attributes with an initial value.
Declare valid methods with a return type (which might be void). Return a value at the end of a method execution. Declare and use local variables and parameters. Identify the signature for the main method, and use it as program entry point (including its parameter). Declare and use static methods and attributes. Given a code fragment, identify the forbidden situation where a static method calls a non-static method (or access a non static attribute) without going through an instance. Understand that static attributes are shared for all instances in the JVM. Assign a visibility modifier (public, private, protected, default) to a method or attribute. In a code fragment, determine the validity of these modifiers basic usage (no trick). Access attributes and methods with and without this keyword. NOT covered: overloading, overriding, super (for the next level). |
17 | 615 | 93 | |
Language Elements
Write small Java programs.
|
|
|||
Variables 2 questions
Declare a variable (local, parameter, attribute).
Know the default value of references, int, double, boolean, float, long, byte, short and char. Identify cases where a default value is not assigned, and predict an error in a code fragment that uses an uninitialized variable. Use blocks "{ }" for narrowing the scope of local variables. Differentiate the scope of attributes and local variables. Given a code fragment, detect the forbidden usage of local variables where they are not visible (outside definition block, before definition). |
23 | 428 | 120 | |
Types 1 question
Write basic code that uses the primitive types int, double, boolean, float, long, byte, short and char.
Instantiate, concatenate and compare String literals and variables. Understand that a String is not a primitive type. Declare and use a single dimension array of primitive or objects. Use the brackets {} to initialize it. Determine the size (amount of elements) of a given array. |
18 | 600 | 53 | |
Operators 1 question
Write expressions and predict the result of given expressions that use these operators: =, +=, ++, ==, !=, <, <=, >, >=, !, ||, &&, +, -, *, /, .equals.
|
25 | 693 | 62 | |
Control Structures 2 questions
Write code with the if-else, while, for, do-while.
NOT covered: switch, continue and break, "for each" introduced in Java 5. |
33 | 272 | 61 | |
Exceptions 2 questions
Catch a checked exception with a try/catch/finally statement.
Use the printStackTrace() method. NOT covered: throwing an exception, throws keyword, custom exceptions classes, nested exceptions, RuntimeException. |
33 | 229 | 50 | |
Misc
Miscellaneous
|
|
|||
Vocabulary and Concepts 1 question
Define the following terms: JVM, JDK, JRE, Java SE.
Differentiate the purpose of the JDK and the JRE. |
13 | 38 | 84 | |
Garbage Collection 1 question
Differentiate the memory management of Java and other languages that do not use garbage collection.
This includes knowing that the JVM tracks unreferenced objects which are eligible for GC, and that the JVM decides when to run the GC. Identify code situations that lead to memory leaks. |
6 | 182 | 29 | |
Naming 1 question
Identify cases where these Java language basic naming conventions are not respected:
|
22 | 92 | 39 | |
Comments and JavaDoc 1 question
Define comments inside a Java code fragment, using // and /* */.
Write basic JavaDoc comments using /**. Navigate through the Jave SE JavaDoc to find informations. NOT covered: JavaDoc @ tags, html syntax in JavaDoc. |
13 | 3 | 67 | |
Files and Packages 1 questionDefine the purpose of .java, .class and .jar files. Create a package and put a class in it. Put a class in the default package. Distinguish a class using:
Know the general purpose of java.lang and java.util. |
21 | 77 | 44 | |
Collections 2 questions
Write code that uses an ArrayList to store and read a list of elements, and an Iterator to iterate on it.
Import the appropriate package. Use ArrayList core methods: .add(Object), .add(int, Object), .get(int), .set(int, Object), remove(int), remove(Object), clear(), contains(Object), size(). Obtain an iterator from an ArrayList and use its core methods: hasNext(), next(). NOT covered: the collection hierarchy (Collection, List,...), maps, Vector, sorting, Arrays class. |
21 | 40 | 155 | |
Exam information
- 30 minutes
- 20 questions (5605)
- 70% required
- +6 √
- - 0 points
- 1 day delay
- status: released



