|
|
- Describe, compare, and contrast these three fundamental types of statements: assignment, conditional, and iteration, and given a description of an algorithm, select the appropriate type of statement to design the algorithm.
- Given an algorithm as pseudo-code, determine the correct scope for a variable used in the algorithm, and develop code to declare variables in any of the following scopes: instance variable, method parameter, and local variable.
- Given an algorithm as pseudo-code, develop method code that implements the algorithm using conditional statements (if and switch), iteration statements (for, for-each, while, and do-while), assignment statements, and break and continue statements to control the flow within switch and iteration statements.
- Given an algorithm with multiple inputs and an output, develop method code that implements the algorithm using method parameters, a return type, and the return statement, and recognize the effects when object references and primitives are passed into methods that modify them.
- Given an algorithm as pseudo-code, develop code that correctly applies the appropriate operators including assignment operators (limited to: =, +=, -=), arithmetic operators (limited to: +, -, *, /, %, ++, --), relational operators (limited to: <, <=, >, >=, ==, !=), logical operators (limited to: !, &&, ||) to produce a desired result. Also, write code that determines the equality of two objects or two primitives.
- Develop code that uses the concatenation operator (+), and the following methods from class String: charAt, indexOf, trim, substring, replace, length, startsWith, and endsWith.
|
|
SCJA Exam Objectives taken from http://www.sun.com/training/catalog/courses/CX-310-019.xml
|
|
| |
| Question 4-1 |
| What will be the result of compiling and running the following code ? |
public class StringCheck {
public static void main(String args[]) {
String s = "SCJA ";
s.trim();
s = s + "Exam";
System.out.println(s);
}
}
|
| Select the correct answer : |
| Question 4-2 |
| What will be the result of compiling and running the following code ? |
public class LoopCheck {
public static void main(String args[]) {
int i = 0;
int x = 10;
while ( x > 6 ) {
System.out.print(++i + " ");
x--;
}
}
}
|
| Select the correct answer : |
| Question 4-3 |
| Which of the following code fragments are a valid iteration statements ? |
| Select all correct answers : |
| a.,b.,c. and d. are correct. |
| Question 4-4 |
| The body of a do while loop is always executed more than one time. |
| Select the correct answer : |
| Question 4-5 |
| Which of the following statements about the ScopeCheck class are true ? |
public class ScopeCheck {
private String name;
private int age;
public String call(String s) {
String text;
return s;
}
}
|
| Select all correct answers : |
|
SCJA.de ebook  more than 200 !!! sample questions for the SCJA exam
5,99 €
|
|
|
|
|