You work as a Software Developer for UcTech Inc. You are building a Web site that will contain study materials on the Java language. The company wants that members can access all the pages, but nonmembers have only limited access to the Web site pages. Which of the following security mechanisms will you use to accomplish the task?
What will happen when you try to compile and execute the following code?
class strconcat {public static void main(String args[])
{String str =" Correct answers";String perc ="a"+"b";System.out.println(80+ '%' + str);}}
Note. The ASCII value of % is 37.
Which of the following methods are used in the verification of a signature?
Each correct answer represents a complete solution. Choose all that apply.
You have the following code of a PreparedStatement.
PreparedStatement stm = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");
Which of the following statements are true about a PreparedStatement?
Each correct answer represents a complete solution. Choose all that apply.
Mark works as a Programmer for InfoTech Inc. He develops the following deployment descriptor code for specifying the security roles for a Web application.
Which of the following are the valid
Each correct answer represents a complete solution. Choose all that apply.
You work as a Software Developer for Developer Inc. You write the following code.
interface A {public boolean b = false;}
class C implements A {public static void main(String args[]) {b = true;System.out.println(b);}}
Which of the following will be the result, when you try to compile and execute the above code?
Which of the following pieces of codes will be placed at the line XXX to successfully compile the given class?
public interface Publication
{
String GetDetails();
}
public class Book implements Publication
{
//line XXX
}
Which of the following statements are true about Vector and ArrayList?
Each correct answer represents a complete solution. Choose all that apply.
You work as a Software Developer for BlueWell Inc. Your team creates a Web site for online shopping.
All payments are made through credit cards. Hence, you want to ensure that the information transferred between the customers and your Web site is encrypted. Which of the following authentication mechanisms will you use to accomplish the task?
Which of the following exceptions will be thrown if the name parameter is null in the constructor of AuthPermission?
Which of the following exceptions will be thrown by the validate method if the result type does not match the Source type, or if the specified source is neither SAXSource nor DOM Source?
Which of the following exceptions will be thrown by the getFeature() method if the feature value cannot be assigned or retrieved?
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 fields must be present in the login page when using the form-based authentication?
Each correct answer represents a part of the solution. Choose two.
Which of the following classes of java.util.logging prints a brief summary of the LogRecord in a human readable format?
Identify whether the given statement is true or false.
"When a Java program starts up, one thread begins running immediately."
You work as a programmer for PassGuide.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1.
Which of the following will be used to retrieve Attribute1?
Each correct answer represents a complete solution. Choose all that apply.
You work as a Software Developer for NewTech Inc. You write a bean class using Enterprise
JavaBeans 3.0. The class uses the @DeclareRoles ("ADMIN, HR, DBA, USER") annotation to declare the security roles. The class contains a method named showResult(). You want to ensure that the ADMIN role is granted privilege to the showResult() method. Moreover, if a role that is not allowed to access the method tries to call the method, an error message must be shown. Assuming that there is no security-related element in the deployment descriptor, which of the following will you use to accomplish the task?
Each correct answer represents a part of the solution. Choose two.
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;}catch(Exception ex){System.out.println("Exception");}
catch(ArithmeticException ae){System.out.println("Arithmetic Exception");}}}
What is the result when Mark tries to compile and execute the code?
Which of the following methods of the EJBContext interface can be called by both the BMT and CMT beans?
Each correct answer represents a complete solution. Choose all that apply.
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 that apply.
Which of the following methods of the HttpServletResponse interface is used for URL rewriting?
Each correct answer represents a complete solution. Choose all that apply.
What will be the output of the following code snippet?
class test22
{
public static void main(String args[])
{
String str= new String("Hello");
str.insert(3,"bye");
System.out.println(str);
}
}
Mark works as a Programmer for InfoTech Inc. He develops a Web application that takes input from users. Which of the following methods can be used by the client and server to validate the users input?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following are valid thread state transitions?
Each correct answer represents a complete solution. Choose all that apply.
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.
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 scriptlet given above?
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.finalize();
7. }
8. }
Which of the following header statements should be placed at line 3 to execute the program
successfully?
You work as a programmer for PassGuide.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1.
Which of the following will be used to retrieve Attribute1?
Each correct answer represents a complete solution. Choose all that apply.
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 the following elements will you use to accomplish the task?
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 named Employee. He has used the executeUpdate() method to perform various SQL queries and to know the exact affected rows in the database if any of the operations is performed against the database table.
Which of the following types of values is returned by this method?
Which of the following listeners causes an object of the implementing class to be notified when it is added to or removed from a session?
Which of the following will be returned by the expression "string" instanceof String?
Which of the following data type values is returned by the System.in.read() console input function?
You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor?
Each correct answer represents a complete solution. Choose all that apply.
GIAC Certification | GSSP-Java Questions Answers | GSSP-Java Test Prep | GIAC Secure Software Programmer – Java Questions PDF | GSSP-Java Online Exam | GSSP-Java Practice Test | GSSP-Java PDF | GSSP-Java Test Questions | GSSP-Java Study Material | GSSP-Java Exam Preparation | GSSP-Java Valid Dumps | GSSP-Java Real Questions | GIAC Certification GSSP-Java Exam Questions