6
Q:

What is the output after compile and run the following code ?

int Output = 10;
boolean b = false;
if((b == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}

A) Compilation and output of "We are equal 10" B) Compilation and output of "Not equal! 10"
C) Compilation error, attempting to perform binary comparison on logical data type D) Compilation and output of "Not equal! 20"

Answer:   B) Compilation and output of "Not equal! 10"



Explanation:

The output will be "Not equal! 10". Please note that && is logical AND operator. If first operand before (&&) is false then the other operand will not be evaluated. This illustrates that the Output +=10 calculation was never performed because processing stopped after the first operand was evaluated to be false. If you change the value of b1 to true, processing occurs as you would expect and the output would be "We are equal 20".

Subject: Oracle Certification
Job Role: Analyst
Q:

Which command is used to return maximum value from result set?

A) MAX B) MIN
C) MAXIMUM D) MAXI
 
Answer & Explanation Answer: A) MAX

Explanation:

MAX command is used to return maximum value from result setMAX 

Report Error

View Answer Report Error Discuss

1 2374
Q:

Can’t update primary table’s primary key if row being modified has related rows in secondary table once referential integrity is enforced

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:
Report Error

View Answer Workspace Report Error Discuss

0 2923
Q:

Breaking of relationships is allowed once referential integrity on a database is enforced

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

Breaking of relationships is prevented once referential integrity on a database is enforced

Report Error

View Answer Workspace Report Error Discuss

0 3978
Q:

STUFF and REPLACE are used to replace characters in a string

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

They both are used to replace characters in a string

Report Error

View Answer Workspace Report Error Discuss

0 2509
Q:

Multiple users can share a local temporary table

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

Multiple users can't share a local temporary table

Report Error

View Answer Workspace Report Error Discuss

0 2975
Q:

What is the difference between a Local and a Global temporary table?

Answer

Local :


Only available to the current Db connection for current user and are cleared when connection is closed.


Multiple users can’t share a local temporary table.


 


Global:


Available to any connection once created. They are cleared when the last connection is closed.


Can be shared by multiple user sessions

Report Error

View answer Workspace Report Error Discuss

1 2415
Q:

Copying the logs on the standby/backup server is an operation of Log Shipping

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

It is one of the operation of Log Shipping

Report Error

View Answer Workspace Report Error Discuss

0 2697
Q:

What is Log Shipping?

Answer

Log shipping defines the process for automatically taking backup of the database and transaction files on a SQL Server and then restoring them on a standby/backup server. This keeps the two SQL Server instances in sync with each other. In case production server fails, users simply need to be pointed to the standby/backup server. Log shipping primarily consists of 3 operations:


Backup transaction logs of the Production server.


Copy these logs on the standby/backup server.


Restore the log on standby/backup server.

Report Error

View answer Workspace Report Error Discuss

1 1910