GIAC Related Exams
GSSP-Java Exam
You work as a Software Developer for BlueTech Inc. You create code using EJB 3.0. You want to ensure that each new record is checked for validation before it is inserted into the database. Which of the following callback methods will you use to write the logic for validation?
You work as a Programmer for InfoTech Inc. You write the following code.
1. public class InnerDemo{
2. public static void main(String[] args) {
3. Car c = new Car();
4. // insert code here
5. e.test();
6. }
7. }
8. class Car{
9. class Engine{
10. void test() {System.out.println("test"); }
11. }
12. }
Which of the following options should you add to line 4 so that the code compiles and produces the output "test"?
You have written the following code snippet.
1. public class Read {
2. protected int ReadText(int x) { return 0; }
3. }
4. class Text extends Read {
5. /*insert code here*/
6. }
Which of the following methods, inserted independently at line 5, will compile?
Each correct answer represents a complete solution. Choose all that apply.