6
Q:

In the following pieces of code, B and D will compile without any error. True or false ?

A: StringBuffer sb1 = "abcd";

B: Boolean b = new Boolean("abcd");

C: byte b = 255;

D: int x = 0x1234;

E: float fl = 1.2;

 

A) TRUE B) FALSE

Answer:   A) TRUE



Explanation:

The code segments B and D will compile without any error. A is not a valid way to construct a StringBuffer, you need to create a StringBuffer object using "new". B is a valid construction of a Boolean (any string other than "true" or "false" to the Boolean constructor will result in a Boolean with a value of "false"). C will fail to compile because the valid range for a byte is -128 to +127 (i.e., 8 bits, signed). D is correct, 0x1234 is the hexadecimal representation in java. E fails to compile because the compiler interprets 1.2 as a double being assigned to a float (down-casting), which is not valid. You either need an explicit cast, as in "(float)1.2" or "1.2f", to indicate a float.

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 2375
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