--%>

Explain Array initializer

Array initializer: This is an initializer for an array. The initializer takes the position of separate creation and initialization steps. For example, the initializer

int[] pair = { 4, 2, };

is equal to the four statements as shown below:

    int[] pair;
    pair = new int[2];
    pair[0] = 4;
    pair[1] = 2;

   Related Questions in Programming Languages

  • Q : What is Abstract method Abstract method

    Abstract method: This is a method with the abstract reserved word in its header. The abstract method has no method body. Methods stated in an interface are for all time abstract. The body of an abstract method should be stated in a su

  • Q : State Cout and Cin Cout: This is an

    Cout: This is an object of ostream_withassign class stated in iostream.h header file

  • Q : Inheritance in Object Oriented

    Q. What is the use of making a method private inside

  • Q : Uses of BYTE Write a program that shows

    Write a program that shows the uses of BYTE, WORD and DWORD?

  • Q : Describe Real number Real number : It

    Real number: It is a number with an integer and a fractional portion. The primitive types double and float are employed to symbolize real numbers.

  • Q : Rings present in CPU What do you mean

    What do you mean by rings present in CPU?

  • Q : Advantages of Object oriented

    Q. What are the advantages of Object Oriented Programming languages? Explain them. Ans. : Object oriented programming language has following advantages-

    Q : Task decomposition and Data

    Discuss the idea of task decomposition and data decomposition within the perspective of parallel programming.

  • Q : Define Hardware Hardware : It is the

    Hardware: It is the physical devices of a computer system, like its micro-chips, keyboard, disk drives, printer, sound card, and so forth. It is termed `hardware' in contrary to programs, which are termed `software'.

  • Q : Define Continuous simulation Continuous

    Continuous simulation: In a continuous simulation, the time ticks past at a regular rate which is applicable to the specific simulation scenario. At each and every tick, all the objects in the simulation are informed of the passage of time and updated