GSSP-JAVA Exam Questions
244 real GSSP-JAVA exam questions with expert-verified answers and explanations. Page 1 of 5.
- Question #1
Which of the following statements is true?
- Question #2
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.to...
- Question #3
Mark works as a Programmer for InfoTech Inc. He develops a Website that uses HTML and processes HTML validation. Which of the following are the advantages of the HTML application?...
- Question #4
Which of the following <security-constraint> sub-elements specifies which users in specified roles are permitted access to a resource collection?
- Question #5
In which of the following directories will files be searched when the classpath is specified by the syntax below.-classpath uc\JavaFiles\NewFiles;uc\ServletFiles;.;
- Question #6
Which of the following is the appropriate deployment descriptor elements entry for the code given below? @RunAs("admin") @Stateless public class StudentBean implements Student { //...
- Question #7
Which of the following methods is used to request that any pending finalizers be run for objects eligible for garbage collection?
- Question #8
Martin works as a Programmer in Data Net Inc. He writes the following code. 1. class Ques0191{ 2. public static void main(String[] argv){ 3. byte a = 1; 4. switch(a+1){ 5. case 1....
- Question #9
You work as a Software Developer for UcTech Inc. You want to declare a security constraint in the deployment descriptor using the <transport-guarantee> element. Which of the follow...
- Question #10
Which of the following methods must be implemented by each subclass of the Permission class to compare permissions?
- Question #11
You work as a Software Developer for UcTech Inc. You want to write a filter that will implement the Filter interface. Which of the following methods will you use to accomplish the...
- Question #12
Which of the following is used to restore the objects that have been previously serialized by a stream?
- Question #13
You work as a Software Developer for UcTech Inc. You build an online book shop, so that users can purchase books using their credit cards. You want to ensure that only the administ...
- Question #14
You work as a Programmer for InfoTech Inc and develop the following two <security-constraint> declarations. <security-constraint> <web-resource-collection> <web-resource-name>Manag...
- Question #15
Mark works as a Programmer for InfoTech Inc. He develops a Java application that uses the encryption and compression techniques. Which of the following interfaces will he use to co...
- Question #16
Which of the following methods is used to encrypt or decrypt data in a single step?
- Question #17
Which of the following methods belongs to the FilterConfig interface and ServletConfig interface both? Each correct answer represents a complete solution. Choose all that apply.
- Question #18
You work as a Software Developer for UcTech Inc. You want to use form-based authentication as a security mechanism in your application. Which of the following entries will you use...
- Question #19
Mark works as a Programmer for InfoTech Inc. He develops a session bean class named accountService. Which of the following rules must be conformed by the session bean class? Each c...
- Question #20
Which of the following methods performs the authentication of subject and, if successful, associates Principals and Credentials with the authenticated Subject?
- Question #21
What will be the output of the following program? class Stringtest { public static void main(String args[]) { String s= "test"; s.concat("paper"); System.out.println(s); } }
- Question #22
Mark works as an Application Developer for XYZ Solutions Inc. He writes the following code. public class TestDemo{public static void main(String[] args){ {try{int x =0;int d= 5/x;}...
- Question #23
Which directory in JAR files is used to store package and extension configuration data?
- Question #24
Mark works as a Programmer for InfoTech Inc. He creates a program that uses the following code. 1. class Book 2. { 3. Short f1= 15; 4. Book GetDetails(Book b1) 5. { 6. b1=null; 7....
- Question #25
Which of the following are valid thread state transitions? Each correct answer represents a complete solution. Choose all that apply.
- Question #26
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 c...
- Question #27
In which of the following cases is the GET method used to retrieve information? Each correct answer represents a complete solution. Choose all that apply.
- Question #28
Which of the following code is used to create an object of security manager?
- Question #29
Which of the following methods returns a Cipher object that implements the specified transformation?
- Question #30
Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. 1. public class Header 2. { 3. //code// 4. { 5. System.out.println("Print the code."); 6. super...
- Question #31
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....
- Question #32
Which of the following is a mandatory sub-element of the <web-resource-collection> element of the deployment descriptor?
- Question #33
Which of the following statements are true? Each correct answer represents a complete solution. Choose all that apply.
- Question #34
The following JSP scriptlet is given. <% response.setContentType("text/html; charset=ISO-8859-1"); %> Which of the following directives is the equivalent directive for the scriptle...
- Question #35
You write the following code. class Father {public void Method() {System.out.println("I am Father");}} public class Son extends Father {public static void main(String argv[]) {Son...
- Question #36
Given below are top-level class declarations. Which of these class declarations would not produce a compile-time error? abstract class P {} //1 private class Q {} //2 static class...
- Question #37
Which of the following statements about the <auth-constraint> element are true? Each correct answer represents a complete solution. Choose all that apply.
- Question #38
Which of the following methods is used to authenticate the users, and if the user has not been authenticated, the method returns false?
- Question #39
Which of the following mechanisms is closely related to authorization?
- Question #40
You work as a Programmer for InfoTech Inc. You develop two html pages named authenticate.jsp and error.jsp, which are deployed directly at the root of the Web application named Aut...
- Question #41
Which of the following are advantages of client-side JavaScript? Each correct answer represents a complete solution. Choose two.
- Question #42
You work as a Software Developer for NewTech Inc. You want to configure the deployment descriptor so as to specify the error pages used in the FORM based authentication. Which of t...
- Question #43
Mark works as a Programmer for InfoTech Inc. He develops a class named Data that imports all the required packages. The class Data uses a method named PrintData(), which uses a met...
- Question #44
Which of the following methods can be invoked from the ejbStore() method of an entity bean class? Each correct answer represents a complete solution. Choose all that apply.
- Question #45
Harry works as a Software Developer for SoftTech Inc. He has developed a Java application to perform various SQL statements such as INSERT, UPDATE, etc., against a database table n...
- Question #47
Which of the following are valid class declarations? Each correct answer represents a complete solution. Choose all that apply.
- Question #48
Which of the following exceptions will be thrown if the caller does not have permission to invoke the doAsPrivileged method?
- Question #49
Which of the following statements about the isCallerInRole() method are true? Each correct answer represents a complete solution. Choose all that apply.
- Question #50
Which of the following actions can you take to seal two packages, PackageA and PackageB, in the JAR file MyJar.jar? Each correct answer represents a complete solution. Choose all t...
- Question #51
Sam works as a Software Developer for Gentech Inc. He writes the following code. 1. class TryFinallyTest { 2. public static void main(String[] args) { 3. try { 4. int i=15/0; 5. Sy...