Which of the following classes enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm?
Which of the following statements about serialization are true?
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?
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?
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
}
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.
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 son = new Son();son.Method();}
private void Method() {System.out.println("I am Son");}}
Which of the following will be the result, when you try to compile and run the code?
Which of the following statements about the isCallerInRole() method are true?
Each correct answer represents a complete solution. Choose all that apply.
You have created a Java application that will retrieve and insert data into a database table. Which of the following objects will you use to pass the JDBC Driver to obtain a connection to the database server?
Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the Test.jar file in the directory /practice. How would you compile your code?
Which of the following statements about a JAR file are true?
Each correct answer represents a complete solution. Choose all that apply.
You work as a Software Developer for UcTech Inc. You create a session using the HttpSession interface. You want the attributes to be informed when the session is moved from one JVM to another and also when an attribute is added or removed from the session. Which of the following interfaces can you use to accomplish the task?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following is used to restore the objects that have been previously serialized by a stream?
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 control the serialization and deserialization processes?
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 are valid code samples for creating file permissions?
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.
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.
Mark works as a Programmer for InfoTech Inc. He develops the following security-constraint code.
//
//
Which of the following
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?
Rachel works as a Software Developer for Vivanet Inc. She writes the following code using Java.
class catchexcp
{public static void metha()
{int x=4/0;System.out.print("Caught exception");}
public static void main(String args[])
{try{metha();}catch(ArithmeticException ae){System.out.print("Caught ArithmeticException");}finally{try{metha();}catch(ArithmeticException ae){System.out.print("ReCaught ArithmeticException");}}}}
What will happen when she tries to compile and execute the code?
You work as a Software Developer for UcTech Inc. You want the deployment descriptor to contain entries for the authentication type and the security realm. In order to accomplish this, you have to use the sub-elements of the
Each correct answer represents a complete solution. Choose all that apply.
Mary works as a Software Developer for XYZ Inc. She writes the following code.
1. class Alpha {
2. public static class Beta { }
3. }
4. class Delta {
5. // insert code here
6. }
Which of the following code statements can be inserted at line 5 to create an instance of the Beta class defined in the class Alpha?
Mary works as a Software Developer for ABC Solutions Inc. She writes the following code.
public class StringMethods {
public static void main(String[] args) {
String str = new String("abc");
str.concat("xyz");
StringBuffer strBuf = new StringBuffer(" 123");
strBuf.append(" no");
System.out.println(str + strBuf);}}
What will be the output when Mary tries to compile and execute the code?
Peter works as a Programmer in Magi Net Inc. He writes the following code.
1. class Ques0190{
2. public static void main(String[] argv){
3. byte a = 100;
4. switch(a){
5. case 10.
6. System.out.println("ten");
7. case 100.
8. System.out.println("hundred");
9. case 1000.
10. System.out.println("thousand");
11. }
12. }
13. }
What will happen when Peter attempts to compile and execute the code?
Which of the following init() method calls initializes a cipher object with a key in the SECRET_MODE?
Which of the following circumstances can prevent the execution of code in a finally block?
Each correct answer represents a complete solution. Choose two.
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 exceptions will be thrown if a cipher is in decryption mode but the decrypted data is not bounded by the appropriate bytes?
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.
Which of the following access modifiers is allowed for the constructor for a session bean class?
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 elements indicates which users in specified roles are permitted access to a resource collection?
The ______________ method of the EJBContext interface tests whether the client is a member of the role specified in the argument to the method.
Which of the following deployment descriptor elements is used to declare the reference of a
client's application to an external resource?
In which of the following locations the helper classes of a session bean class reside?