Technology Questions

Q:

Why synchronization?

Answer

When ever two or more threads are sharing same data for updating then unpredicted result will be there in the data.


For Example take a thread is depositing amount in Account Object and another thread is withdrawing amount from the same Account Object.


when ever both threads are executed simultaneously then unexpected result is stored in the balance of the  Account Object. 

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2086
Q:

What is a view?

Answer

It is virtual table which is defined as a stored procedure based on one or more tables.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2084
Q:

Echo vs print statement

Answer

echo() and print() are language constructs in PHP, both are used to output strings. The speed of both statements is almost the same.


echo() can take multiple expressions whereas print cannot take multiple expressions.


Print return true or false based on success or failure whereas echo doesn't return true or false.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2083
Q:

Write a method to fill all the spaces in a string with '%20'

Answer

public class Test {


    public void replaseSpaces(char[] str, int length) {


        int spaceCount = 0, newLength = 0, i = 0;


        for(i = 0; i < length; i++) {


            if (str[i] == ' ') 


                spaceCount++;


        }


 


        newLength = length + (spaceCount * 2);


        str[newLength] = '\0';


        for(i = length - 1; i >= 0; i--) {


            if (str[i] == ' ') {


                str[newLength - 1] = '0';


                str[newLength - 2] = '2';


                str[newLength - 3] = '%';


                newLength = newLength - 3;


            }


            else {


                str[newLength - 1] = str[i];


                newLength = newLength - 1;


            }


        }


        System.out.println(str);


    }


 


    public static void main(String[] args) {


        Test tst = new Test();


        char[] ch = {'t', 'h', 'e', ' ', 'd', 'o', 'g', ' ', ' ', ' ', ' ', ' ', ' '};


        int length = 6;


        tst.replaseSpaces(ch, length);  


    }


}

Report Error

View answer Workspace Report Error Discuss

0 2081
Q:

How do you submit a form using Javascript?

Answer

Use document.forms[0].submit();

(0 refers to the index of the form – if you have more than one form in a page, then the first one has the index 0, second has index 1 and so on).

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2078
Q:

Data structure suitable for an application discussed in?

A) procedural design B) architectural design
C) data design D) interface design
 
Answer & Explanation Answer: C) data design

Explanation:
Report Error

View Answer Report Error Discuss

1 2075
Q:

What are the steps you go through while creating a COBOL program executable?

Answer

DB2 precompiler (if embedded sql used), CICS translator (if CICS program), COBOL compiler, Link editor. If DB2 program, create plan by binding the DBRMs.

Report Error

View answer Workspace Report Error Discuss

0 2072
Q:

What is the difference between Business Analyst & System Analyst?

Answer

The business analyst must understand IT and also has to understand the stakeholder’s needs. 


A systems analyst has the ability to look at a program or utility and see the code. They can go in and pinpoint where changes need to be made. 

Report Error

View answer Workspace Report Error Discuss

0 2072