Technology Questions

Q:

What are instance variables?

Answer Instance variables are those which are defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2177
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 2174
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 2174
Q:

Client code having direct access to internal data is called

A) Encapsulation B) DataHiding
C) Polymorphism D) DataAbstraction
 
Answer & Explanation Answer: B) DataHiding

Explanation:

Client code must use setters and getters to access internal data in DataHiding

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 2174
Q:

What is the importance of Doctype in HTML?

Answer

Doctype tag is not a HTML tag, it is just an instruction that is passed to the web browser to check for the information that is being provided by the markup language in which the page is written. Doctype is sometimes referred as Document type definition (DTD) that describes some rules that has to be followed while writing the markup language so to make the web browser understand the language and the content correctly. Doctype is very important to be placed in the beginning of the HTML and before the <HTML> tag to allow easy rendering of the pages that are used.

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

1 2171
Q:

What is AWB?. What is its purpose?

Answer

AWB stands for Administrator WorkBench. AWB is a tool for controlling, monitoring and maintaining all the processes connected with data staging and processing in the business information whearhousing.

Report Error

View answer Workspace Report Error Discuss

Subject: SAP

0 2171
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 2169
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 2167