| Exam Code/Number: | GSSP-JaVaJoin the discussion |
| Exam Name: | GIAC Secure Software Programmer - Java |
| Certification: | GIAC |
| Question Number: | 275 |
| Publish Date: | Nov 23, 2026 |
|
Rating
100%
|
|
Dennis works as a Programmer in Broadnet Inc. He writes the following program.
1.public class Ques0307{
2.public static void main(String[] argv){
3.int arr[] = {1, 2, 3, 4};
4.try{
5.int k = 0;
6.for(; k < 4; k++)
7.arr[k] = arr[k] + 1;
8.System.out.println("try");
9.}
10.
catch(ArrayIndexOutOfBoundsException a){
11.
System.out.println("index " +k +" not found");
12.
}
13.
catch(Exception e){
14.
System.out.println("catch1");
15.
}
16.
finally{
17.
System.out.println("finally");
18.
}
19.
}
20.
}
What will happen when Dennis attempts to compile and execute the program?
Which of the following statements about a JAR file are true?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following options directs the Java compiler to search files in the current directory?
John works as a Programmer for Technostar Inc. He writes the following code using Java.
1.class WrapperClass{
2.public static void main(String[] argv){
3.String str2 = Double.toString(12);
4.String str1 = Double.toHexString(12);
5.System.out.println(str1+str2);
6.}
7.}
What will happen when John attempts to compile and execute the code?
Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. class Auto
{public static void main(String args[])
{Character iob ='d';float i=iob;System.out.println(iob);}}
What will be the result when Mark tries to execute the code snippet?