Searching for "="

Q:

What will be the output of the following code snippet?

Object s1 = new String("Hello");
Object s2 = new String("Hello");
 
if(s1 == s2) {
  System.out.println("s1 and s2 are ==");
}else if (s1.equals(s2)) {
  System.out.println("s1 and s2 are equals()");
}

Answer

Answer : s1 and s2 are equals()


 


Explanation :



 

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

You get a great deal on a refurbished laser printer. The printer is plug and play compliant and connects to your USB port. The printer is on the current Windows 2000 Hardware Compatibility List (HCL). You install the printer and run the manufacturers setup program. During the installation, you receive the error shown in the exhibit (See the exhibit below). What should you do?

A) Change the USB port setting to enable legacy Plug and Play detection. B) Configure the USB port to Disable Error Detection.
C) Connect the printer as a shared device on a non-Windows 2000 computer. D) Install the WDM-compliant device drivers using the Add New Hardware wizard.
 
Answer & Explanation Answer: D) Install the WDM-compliant device drivers using the Add New Hardware wizard.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

You provide technical support for a company with several locations. In a remote sales office, there are 5 Windows 2000 Professional computers. All computers are connected in a workgroup, as shown in the exhibit. (See the exhibit below). The manager's computer has a 56K dial up connection to the Internet. The manager calls and explains that she had enabled ICS (Internet Connection Sharing) on her computer. Once ICS had been enabled, none of the other users were able to access a shared folder on the manager's computer. What should you instruct her to do ?

 

A) Configure the dial-up connection to disable shared access. B) Configure the dial-up connection to disable on-demand dialing.
C) Disable data encryption in the new dial-up connection. D) Use the ipconfig command to release and renew your network TCP/IP address.
 
Answer & Explanation Answer: A) Configure the dial-up connection to disable shared access.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

Your network consists of a single Active Directory domain. All network servers run Windows Server 2003 Service Pack 2 (SP2). You share a folder named Research. A user named User1 reports that he cannot access files in the Research share. You confirm that the Domain Users group is granted the Change permission for the Research share. You run the Cacls command as shown in the exhibit:

You need to ensure that User1 can modify files in the Research share. You must prevent User1 from modifying permissions for the Research folder. To which group should you add User1?

A) Administrators B) IT
C) Research D) ResearchManagers
 
Answer & Explanation Answer: D) ResearchManagers

Explanation:
Report Error

View Answer Report Error Discuss

Q:

Your network contains an application server named Server1 that runs Windows Server 2003 Service Pack(SP2). You open the Performance tab in Task Manager as shown in the exhibit:

You need to improve the performance of Server1. What should you do?

 

A) Install additional RAM. B) Install a second processor.
C) Decrease the size of the paging file. D) Add the /PAE switch to the Boot.ini file.
 
Answer & Explanation Answer: A) Install additional RAM.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

You have a server that runs Windows Server 2003 Service Pack 2 (SP2). The server is configured as shown in the following table.

You need to create a software mirror of Disk1. What should you do first?

A) Convert Disk3 to a dynamic disk. B) Create a new NTFS volume on Disk3.
C) Run the Extend Volume Wizard on Disk1. D) Convert Disk3 to a GUID Partition Table (GPT) disk.
 
Answer & Explanation Answer: A) Convert Disk3 to a dynamic disk.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

Your network consists of a single Active Directory domain. All servers run Windows Server 2003 Service Pack 2 (SP2). All client computers run Windows XP Professional Service Pack 3 (SP3). On a file server, you have a shared folder named Data. The Data folder has the permissions shown in the following table:

You need to ensure that members of a group named Sales can modify content in the Data share. Sales group members must only be allowed to delete files that they create. Which additional permission should you assign to the Sales group?

A) On the Data folder, allow the Write permission. B) On the Data folder, allow the Modify permission.
C) On the Data share, allow the Change permission. D) On the Data share, allow the Full Control permission.
 
Answer & Explanation Answer: A) On the Data folder, allow the Write permission.

Explanation:
Report Error

View Answer Report Error Discuss

Q:

You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. The database has a Parts table that has a field named InStock.When parts are shipped, a table named PartsShipped is updated. When parts are received, a table named PartsReceived is updated. The relationship of these tables is shown in the exhibit. (Click the Exhibit button.)

You want the database to update the InStock field automatically. What should you do?

A) Add triggers to the PartsShipped and the PartsReceived tables that update the InStock field in the Parts table. B) Use a view that creates anInStock field as part of an aggregate query.
C) Create stored procedures for modifying the PartsReceived and the PartsShipped tables that also modify the InStock field in the Parts table. Use these procedures exclusively when modifying data in the PartsReceived and the PartsShipped tables. D) Create a user-defined function that calculates current inventory by running aggregate queries on the PartsShipped and PartsReceived tables.
 
Answer & Explanation Answer: A) Add triggers to the PartsShipped and the PartsReceived tables that update the InStock field in the Parts table.

Explanation:

Triggers are a special class of stored procedure defined to fire automatically when an UPDATE, INSERT, or DELETE statement is issued against a table or view. They are powerful tools that can be used to enforce business rules automatically when data is modified. Triggers can extend the integrity checking logic of SQL Server constraints, defaults, and rules, although constraints and defaults should be used instead whenever they provide all the needed functionality. In this scenario an AFTER UPDATE trigger can be used to update the tables to update the PartsShipped and the PartsReceived tables that update the InStock column in the parts table.

Report Error

View Answer Report Error Discuss