Interview Questions

Q:

What is the argument of main() method?

Answer main() method accepts an array of String object as arguement.
Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2392
Q:

Which describes how media and networks interact?

Answer

Media and networks are connected in such a way that the consumer receives the effective information. Media goes into different networks.

Report Error

View answer Workspace Report Error Discuss

0 2390
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 2389
Q:

What are the types of constraints avaialable in oracle?

Answer

Oracle constraints are used to maintain consistent of data and ensure the data is properly maintained. A constraint is more or less a restriction we try to apply on a table.
Types of constraints:
- Check constraints
- NOT NULL constraint
- PRIMARY KEY constraint
- REFERENCES constraint
- UNIQUE constraint

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2389
Q:

When a debtor owes several debts to a banker and makes a payment, the right of appropriation lies with

A) The Court B) The Banker
C) The Debtor D) All the above
 
Answer & Explanation Answer: C) The Debtor

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Bank Interview
Exam Prep: Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

4 2388
Q:

Explain how PL/SQL exceptions are raised.

Answer

PL/SQL exceptions are raised using the RAISE command. This command is used when exceptions are defined by programmer and not implicit exceptions.


 


Example:


Declare and raising an exception:


DECLARE


short_of_attendance EXCEPTION;


min_attendance NUMBER(4);


BEGIN


...


IF min_attendance < 10 THEN


RAISE short_of_attendance;


END IF;


EXCEPTION


WHEN short_of_attendance THEN


-- handle the error


END;

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2388
Q:

What is Aggregate Functions?

Answer

Aggregate functions perform a calculation on a set of values and return a single value. Aggregate functions ignore NULL values except COUNT function. HAVING clause is used, along with GROUP BY, for filtering query using aggregate values.


Following functions are aggregate functions. 


AVG, MIN CHECKSUM_AGG, SUM, COUNT, STDEV, COUNT_BIG, STDEVP, GROUPING, VAR, MAX. VARP

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2386
Q:

What is a Product Roadmap?

Answer

A Product Roadmap is a plan that matches short-term and long-term business goals with specific technology solutions to help meet those goals. It is a high-level visual summary that maps out the vision and direction of your product offering over time.


1. A product roadmap communicates the why and what behind what you're building.


2. It's a guiding strategic document as well as a plan for executing the strategy.


3. Roadmapping is the exercise of building a product roadmap. Roadmaps can apply to new products or services or existing offerings.

Report Error

View answer Workspace Report Error Discuss

4 2385