Vous êtes sur la page 1sur 9

54:59 Topic : GF_JAVA_FY12 Sub Topic : Classes and Objects Question 1 Topic: JAVA, Sub-topic : Classes and Objects

________ and _______ makes up object in Java. Fill up the blanks with appropriate option. a. Attributes and behaviour Topic : GF_JAVA_FY12 Sub Topic : Classes and Objects Question 2 Topic: JAVA, Sub-topic : Classes and Objects An inner class has free access to private member data of the outer classes. State TRUE/FALSE a. FALSE Topic : GF_JAVA_FY12 Sub Topic : Inheritance Question 3 Topic: Java, Sub-topic: Inheritance Consider the below code: class Base { String s = name(); String name() { return "Base"; } } class Derived extends Base { String s = super.s; String name() { return "Derived"; } } public class Demo { public static void main(String[] args) { Base b = new Derived(); System.out.println(b.s); } } What will be the output of above code? Choose most appropriate option. b. Derived Topic : GF_JAVA_FY12 Sub Topic : Inheritance Question 4 Topic:Java, Sub-Topic:Inheritance Consider the following code: class DemoOne { public void methOne() { System.out.print("DemoOne.MethodTwo"); } } public class DemoTwo extends DemoOne { public void methodOne() { System.out.println("DemoOne.MethodOne"); }

public static void main(String[] args) { ((DemoOne)new DemoTwo()).methOne(); } } What will be the output of the above code? Choose most appropriate option. a. DemoOne.MethodTwo Topic : GF_JAVA_FY12 Sub Topic : Inheritance Question 5 Topic: JAVA, Sub-topic : Inheritance Refer to the code given in the attached figure, What will happen when the given code is executed? Click on the hyperlink to view the figure Choose appropriate option a. Sum is:30 gets printed at console. b. Compilation fails since xyz variable is declared as private c. XYZ class and xyz variable both will give compliation error d. Sum is:0 gets printed at the console. Topic : GF_JAVA_FY12 Sub Topic : Java Fundamentals Question 6 Topic: JAVA, Sub-topic : Java Fundamentals Consider the following code: int number[] = new int[5]; After execution of this statement, which of the following are true? Choose three appropriate options. a. number[0] is undefined d. number[2] is 0 e. number.length() is 5 Topic : GF_JAVA_FY12 Sub Topic : Java Fundamentals Question 7 Topic:Java, Sub-Topic:Fundamentals Interface variables are implicitly _________, _________ and _________. Fill in the blank with three appropriate options. a. public b. final c. static Topic : GF_JAVA_FY12 Sub Topic : Java Fundamentals Question 8 Consider the following code: public class Know { public static void main(String[] args) { String string = "Accenture"; Object object = string; if (object.equals(string)) { System.out.print("1"); } else { System.out.print("2"); } if (string.equals(object)) { System.out.print("3"); } else { System.out.print("4"); } }

} What will be the output of above code? Choose the correct option. b. 13 Topic : GF_JAVA_FY12 Sub Topic : Java Fundamentals Question 9 Topic: Java, Sub-Topic: Fundamentals Consider the following code: class Funda { public static void main(String args[]){ int Value1= 12; Value1+=Value1 + Value1; System.out.println(Value1-- - Value1); } } What will be the output of above code? Choose most appropriate option. c. 1 Topic : GF_JAVA_FY12 Sub Topic : Polymorphism Question 10 Topic:Java, Sub-Topic:Polymorphism Method declared as static and public can be overloaded. State TRUE or FALSE a. TRUE Topic : GF_JAVA_FY12 Sub Topic : Polymorphism Question 11 Topic: Java, Sub-topic: Polymorphism Consider the below code: public class DemoPoly{ static String method1(int n) { return "int"; } static String method1(double n) { return "double"; } public static void main (String[] args) { long x = 1; double y = 2; System.out.print(method1(x)+","+ method1(y)); } } What will be the output of above code? Choose most appropriate option. c. double , double Topic : GF_HTML-Jsc_FY12 Sub Topic : HTML Question 12 Topic:HTML,Sub-Topic:HTML Which among the following attributes can be used with body tag to change the background of the HTML page to RED colour? Choose most appropriate options. d. bgcolor

Topic : GF_HTML-Jsc_FY12 Sub Topic : HTML Question 13 Topic:HTML,Sub-Topic:HTML Identify the tag, which contains "action" as one of its attributes. Choose most appropriate option. a. form tag c. input tag Topic : GF_HTML-Jsc_FY12 Sub Topic : HTML Question 14 Topic:HTML,Sub-Topic:HTML Which of the following statement about HTML is not true ? Choose the most appropriate option. a. HTML is encoding language for creating web pages that can be displayed by any browser. b. It is written using plain text editors or HTML editor. d. It can have extension .htm or .html Topic : GF_HTML-Jsc_FY12 Sub Topic : JSc Question 15 Topic:Javascript,Sub-Topic:Javascript Consider the following code: <html> <body> <script type="text/javascript"> mynumber =150; mynumber="Number One"; document.write("The value is "+mynumber); </script> </body> </html> What will happen if the above code is executed? Choose most appropriate option. c. The value is Number One gets printed Topic : GF_HTML-Jsc_FY12 Sub Topic : JSc Question 16 Topic:JavaScript, Sub-Topic:JavaScript Consider the following code: <html> <head> <script type="text/javascript"> sum=num1+num2; document.write(sum); </script> </head> </html> What will happen if the above code is executed? Choose appropriate option. d. No Output Topic : GF_Oracle_FY12 Sub Topic : Aggregate Functions Question 17 Topic:Oracle Sub-Topic:Aggregate Functions Consider the below query that displays the department number, department name and the number of employees assigned to each department. SELECT dept.deptno,dname,count(*) FROM emp ,dept 1 2 ;

Choose two appropriate options that can selected to complete the query. a. 1 - WHERE emp.deptno=dept.deptno d. 1 - GROUP BY dept.deptno Topic : GF_Oracle_FY12 Sub Topic : Aggregate Functions Question 18 Topic:Oracle Sub-Topic:Aggregate Functions Complete the below update clause that will promote all Salesman to Manager provided they have been in the company for more than four years ? UPDATE emp SET JOB='MANAGER' _____________________; Choose the most appropriate option. a. WHERE empno IN (SELECT EMPNO FROM emp WHERE SYSDATE-HIREDATE/365 > 4 AND job ='SALESMAN'); b. WHERE (SYSDATE-HIREDATE)/365 > 4 AND job ='SALESMAN' c. WHERE empno IN (SELECT EMPNO FROM emp WHERE SYSDATE-HIREDATE/365 > 4); d. All of the above Topic : GF_Oracle_FY12 Sub Topic : Constraint Question 19 Topic: Oracle,Sub-Topic:Constraint After creating a column with NOT NULL constraint, it is not possible to enter NULL values in it. Choose a work-around for the above problem. Choose most appropriate option. b. Alter the column using MODIFY keyword to accept NULL values. Question 20 Topic:SQL,Sub-Topic:Constraint What is the relationship between foreign key and primary key ? Choose two appropriate options. a. A foreign key constraint works in conjunction with primary key constraint to enforce referential integrity among related entities c. A foreign key attribute(s) of an entity to the primary key of another entity, for the purpose of creating a dependency d. A foreign key enforces entity intergrity and primary key enforces domain intergrity. Topic : GF_Oracle_FY12 Sub Topic : DDL Question 21 Topic: Oracle, Sub-Topic: DDL Which of the following create statements will execute successfully ? Choose most appropriate option. b. create table supplier(sno char(3) constraint pk_sno primary key(sno) ,sname varchar(10),scity varchar2(10)); d. create table supplier(sno integer(3),sname varchar(10),scity char(10)); Topic : GF_Oracle_FY12 Sub Topic : E-R Diagrams Question 22 Topic:Oracle,Sub-Topic:SQL Which of the following symbol is used to depict a relationship between entities ? Choose most appropriate option. c. Arrows Topic : GF_Oracle_FY12 Sub Topic : Introduction to RDBMS Question 23 Topic:Oracle,Sub-Topic:RDBMS In Comprehensive Data Sub-Language Rule,E.F.Codd says that SQL should support _________.

Complete the sentence with appropriate option. a. Data Definition and Manipulation,Authorization,Views,Integrity Constraints and Transactions b. Data Definition,Authorization and Transactions c. Authorization,Views,Integrity Constraints,Transactions and E-R Models. d. Data Definition,Authorization,Transactions and Views Topic : GF_Oracle_FY12 Sub Topic : Join Question 24 Topic:SQL, Sub-Topic:Join Which of the following are true regarding the use of outer joins? Choose three appropriate options. a. You cannot use IN operator in a condition that involves an outerjoin. b. You can use (+) on both sides of the WHERE condition to perform an outerjoin. d. In the WHERE condition, you can use (+) following the name of the column in the table without matching rows, to perform an outerjoin. Topic : GF_Oracle_FY12 Sub Topic : Sub-Query Question 25 Topic:Oracle, Sub-Topic:SQL Which of the following Operator can not be used with a Multi Row Subquery ? Choose three appropriate options. b. = c. LIKE d. BETWEEN Topic : GF_Oracle_FY12 Sub Topic : Views Question 26 10 Topic: Oracle, Sub-Topic: Views Consider the following scenarios given. 1. CREATE TABLE product(prodno NUMBER(2),pname VARCHAR2(10),count NUMBER(4)); 2. INSERT INTO product VALUES(11,'Belts',120); 3. INSERT INTO product VALUES('12','Shirts',200); 4. CREATE VIEW prod_vw AS SELECT * FROM product ; 5. ALTER TABLE product ADD prod_cost NUMBER(7,2); 6. INSERT INTO prod_vw values(13,'Tie',150,399.99); 7. SELECT * FROM prod_vw; Which of the following statements will fail when executed in the sequence as shown above ? a. Line 3 and 6 will fail as datatype mismatch and wrong number of arguments respectively Topic : GF_Oracle_FY12 Sub Topic : DML Question 27 Topic:SQL,Sub-Topic:DML "Having" clause can act like ____________ inside group by expressions. Complete the sentence with the most appropriate option. a. order by Topic : GF_Oracle_FY12 Sub Topic : DML Question 28 Topic:SQL,Sub-Topic:DML Which of the following command requires explicit commit?

Choose most appropriate option. b. GRANT Topic : GF_Oracle_FY12 Sub Topic : DML Question 29 Topic:SQL, Sub-Topic:DML Assume that you want to enter multiple rows into EXAM table. Which is the appropriate option used to execute the same query repeatedly entering different values for variables at runtime? Choose most appropriate option. Note: Ignore amp; b. INSERT INTO EXAM (Stud_Roll,Test_No,Marks) VALUES(v1,v2,v3); c. INSERT INTO EXAM (Stud_Roll,Test_No,Marks) VALUES(&a,&b,&c); Topic : GF_Oracle_FY12 Sub Topic : DML Question 30 Topic:SQL, Sub-Topic:DML A course_table contains 525 records corresponding to employees of a company. One of those records has a null value stored in the test_appeared column. What will be the output of the following query? SELECT COUNT(test_appeared) FROM course_table; Choose most appropriate option. b. 524 Topic : GF_Oracle_FY12 Sub Topic : DML Question 31 Topic:SQL,Sub-Topic:DML CREATE TABLE Assets AS SELECT * FROM assets; What will be the result of above SQL query ? Choose most appropriate option. b. A table named "Assets" will be created which same number of records as "assets" table Topic : GF_OOADANDUML_FY12 Sub Topic : OOAD&UML Question 32 Topic:Java,Sub-Topic:UML An interaction between an actor and a system is denoted by a line marked by a _______ tag. Choose appropriate option. a. <<uses>> Topic : GF_OOADANDUML_FY12 Sub Topic : OOAD&UML Question 33 Topic:Java,Sub-Topic:UML Identify the option in which the objects can exist independent of each other. Choose the most appropriate option. b. Association Topic : GF_OOADANDUML_FY12 Sub Topic : OOAD&UML Question 34 Topic:Java,Sub-Topic:UML Which of the following statements are TRUE with respect to Sequence Diagram ? Choose most appropriate option. a. Messages are indicated as solid horizontal arrows attached to the timeline of the source object to the target object Topic : GF_OOADANDUML_FY12 Sub Topic : OOAD&UML

Question 35 Topic:Java,Sub-Topic:UML Use Case Diagram displays relationships and interactions between _______ and the ______ they act upon. Fill in the blank with an appropriate option. a. actors,systems Topic : GF_OOADANDUML_FY12 Sub Topic : OOAD&UML Question 36 Topic:Java,Sub-Topic:UML Which of the following statement is TRUE regarding UML Diagrams ? Choose most appropriate option. b. Sequence diagrams show a group of objects interacting within a system to perform a specific functionality. Topic : GF_JAVA_FY12 Sub Topic : Constructor Question 37 Topic:Java,Sub-Topic:Fundamentals What happens when a constructor is not defined for a user-defined class? Choose most appropriate option. b. There is a default constructor, which takes arguments of the same type as the data members in order. Topic : GF_JAVA_FY12 Sub Topic : Constructor Question 38 Topic:Java SubTopic:Fundamentals Consider the following code: class Accenture1 { Accenture1() { { System.out.print(" You are in Accenture "); } } } public class Acc_Constructor { public static void main(String args[]) { Accenture1 obj = new Accenture1(); System.out.print(" and giving exam."); } } What will be the output of above code? Choose most appropriate option. a. You are in Accenture and giving exam. Topic : GF_JAVA_FY12 Sub Topic : Java Fundamentals Question 39 Topic:Java,Sub-Topic:Fundamentals Which of the following are VALID declarations of arrays ? Choose two appropriate options. a. int myarr[]=new myarr[10]; c. int[] myarr={11,13,17,19}; Topic : GF_JAVA_FY12 Sub Topic : Polymorphism Question 40 Topic:Java,Sub-Topic:Java Fundamentals Consider the following code:

class IDC{ void display(){ System.out.println("India Delivery Center"); } } public class Location extends IDC{ void display(){ System.out.println("All locations"); } public static void main(String[] args){ Location Location= new Location(); IDC IDC = new IDC(); IDC = Location; IDC.display(); } } What will be the output of the above code? Choose most appropriate option. a. All locations . Copyright 2006 - 2010 Accenture. All Rights Reserved. Accenture Confidential. For Internal Use Only. Version History