Friday, July 19, 2013

ORACLE MCQ Test – 3

Que.1. Which schema object instructs Oracle to connect to a remotely access an object of a database?

A:    Sequence
B:    Remote link
C:    Database link
D:    Data link

Right Answer: D

Que.2. DML changes are

A:    insert
B:    update
C:    create
D:    both a and b

Right Answer: D

Que.3. Is global temporary table session specific?

A:    Yes
B:    No

Right Answer: A

Que.4. Which of the following object types below cannot be replicated?

A:    Data
B:    Trigger
C:    View
D:    Sequence

Right Answer: D

Que.5. Procedures and functions that are created within a package are called standalone subprograms

A:    True
B:    False

Right Answer: B

Que.6. How to force a log switch?

A:    By using ALTER SYSTEM LOG
B:    By using ALTER SYSTEM SWITCH LOGFILE
C:    By using ALTER SYSTEM SWITCH LOGS
D:    By using ALTER SYS LOGFILES

Right Answer: B

Que.7. The SYSDBA and SYSOPER system privileges allow access to a database instance even when the database is not open

A:    True
B:    False

Right Answer: A

Que.8. In the following query, which expression is evaluated first?
SELECT id_number, (quantity - 100 / 0.15 - 35 * 20) FROM inventory

A:    100 / 0.15
B:    quantity - 100
C:    35*20
D:    0.15-35

Right Answer: A

Que.9. The ORDER BY clause can only be used in

A:    SELECT queries
B:    INSERT queries
C:    GROUP BY queries
D:    HAVING queries

Right Answer: A

Que.10. Which of the following rule below are categories of index?

A:    Column and Functional
B:    Multiple Column and functional
C:    Both and b
D:    None of the above

Right Answer: A

Que.11. What is the purpose of SMON background process?

A:    Performs crash recovery when a failed instance starts up again
B:    Performs recovery when a user process fails
C:    Both a and b
D:    Writes redo log entries to disk

Right Answer: A

Que.12. Recycle bin can be turned on or off in the recyclebin=on/off in

A:    Parameter file
B:    PARFILE
C:    datafiles
D:    PFILE

Right Answer: A

Que.13. The ______________ records all changes made to data

A:    Redo log
B:    Archive log
C:    Both a and b
D:    Data file

Right Answer: A

Que.14. When a transaction modifies the database, Oracle copies the original data before modifying it. The original copy of the modified data is called

A:    Undone Data
B:    Archive data
C:    Redo data
D:    Undo data

Right Answer: D

Que.15. Which of the following queries are legal?

A:    SELECT deptno, count(deptno) FROM emp GROUP BY ename;
B:    SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;
C:    SELECT deptno, avg(sal) FROM emp;
D:    SELECT deptno, avg(sal) FROM emp GROUP BY deptno;

Right Answer: D

Que.16. Which of the following queries displays the sum of all employee salaries for those employees not making commission, for each job, including only those sums greater than 2500?

A:    select job, sum(sal) from emp where sum(sal) > 2500 and comm is null;
B:    select job, sum(sal) from emp where comm is null group by job having sum(sal) > 2500;
C:    select job, sum(sal) from emp where sum(sal) > 2500 and comm is null group by job;
D:    select job, sum(sal) from emp group by job having sum(sal) > 2500 and comm is not null;

Right Answer: B

Que.17. A stored procedure is only executed

A:    implicitly
B:    when asked explicitly
C:    when the trigger associated with it is also invoked
D:    none of the above

Right Answer: B

Que.18. When an Oracle database is created, which user is automatically created and granted the DBA role

A:    SYS
B:    SYSTEM
C:    SGA
D:    Both a and b

Right Answer: D

Que.19. Each tablespace in an Oracle database consists of one or more files called

A:    Files
B:    name space
C:    datafiles
D:    PFILE

Right Answer: C

Que.20. Even though a table space may be dropped, the objects and data in it are still available

A:    True
B:    False

Right Answer: B

Java MCQ Test – 3

Que.1. Which of the following is synchronized?

A:    Set
B:    LinkedList
C:    Vector
D:    WeakHashMap

Right Answer: A

Que.2. What kind of thread is the Garbage collector thread is?

A:    Non daemon thread
B:    Daemon thread
C:    Thread with dead state
D:    None of the above

Right Answer: B

Que.3. Which of the following below is true for StringBuffer?

A:    Both B and C
B:    When an application is to run a single thread using some changes for strings, it is advisable to use StringBuffer
C:    StringBuffer class is not synchronized
D:    StringBuffer is thread safe

Right Answer: A

Que.4. When a thread terminates its processing, into what state that thread enters?

A:    Running state
B:    Waiting state
C:    Dead state
D:    Beginning state

Right Answer: C

Que.5. For an interface class, All methods in an interface must not have abstract access modifier

A:    True
B:    False

Right Answer: A

Que.6. Which of these statements is true?

A:    LinkedList extends List
B:    AbstractSet extends Set
C:    HashSet extends AbstractSet
D:    WeakHashMap extends HashMap

Right Answer: C

Que.7. Select all the true statements from the following.

A:    AbstractSet extends AbstractCollection
B:    AbstractList extends AbstractCollection
C:    HashSet extends AbstractSet
D:    Vector extends AbstractList
E:    All choices are correct.

Right Answer: E

Que.8. Which of the following statements is true?

A:    A subclass is a sub set of a superclass
B:    class ClassTwo extends ClassOne means ClassOne is a subclass
C:    class ClassTwo extends ClassOne means ClassTow is a super class
D:    the class Class is the super class of all other classes in Java.

Right Answer: A

Que.9. Which of the following statements is preferred to create a string "Welcome to Java Programming"?

A:    String str = "Welcome to Java Programming"
B:    String str = new String( "Welcome to Java Programming")
C:    String str; str = "Welcome to Java Programming"
D:    String str; str = new String ("Welcome to Java Programming")

Right Answer: A

Que.10. Which statement is true?

A:    HashTable is a sub class of Dictionary
B:    ArrayList is a sub class of Vector
C:    LinkedList is a subclass of ArrayList
D:    Vector is a subclass of Stack

Right Answer: A

Que.11. How many numeric data types are supported in Java?

A:    8
B:    4
C:    2
D:    6

Right Answer: D

Que.12. All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character) in java __________.

A:    are private
B:    are serializable
C:    are immutatable
D:    are final

Right Answer: D

Que.13. The code snippet if ( "Welcome".trim() == "Welcome".trim() ) System.out.println("Equal"); else System.out.println("Not Equal");
will ___________.

A:    compile and display Equal
B:    compile and display Not Equal
C:    cause a compiler error
D:    compile and display NULL

Right Answer: C

Que.14. ____________ compiler coverts a byte code of one operating system to the current operating system's executable code

A:    JTI
B:    JJT
C:    JIT
D:    JVM

Right Answer: A

Que.15. A ResourceBundle is a group of related sub classes which are _____________

A:    having different base names
B:    sharing the same base name

Right Answer: A

Que.16. An interface contains ______________ methods

A:    Non-abstract
B:    Implemented
C:    unimplemented

Right Answer: C

Que.17. Which of the following statements declare class Sample to belong to the payroll.admindept package?

A:    package payroll;package admindept;
B:    import payroll.*;
C:    package payroll.admindept.Sample;
D:    import payroll.admindept.*;
E:    All choices are correct.

Right Answer: D

Que.18. The class java.lang.Exception is

A:    protected
B:    extends Throwable
C:    implements Throwable
D:    serializable

Right Answer: B

Que.19. Consider the following code snippet. What will be assigned to the variable fourthChar

String str = new String("Java");
char fourthChar = str.charAt(4);

A:    a
B:    v
C:    throws StringIndexOutofBoundsException
D:    null characater

Right Answer: C

Que.20. Which of the following statements is true?

A:    An exception can be thrown by throw keyword explicitly.
B:    An exception can be thrown by throws keyword explicitly.

Right Answer: A