--%>

Explain Declaration and initialization

Declaration and initialization: It is a statement in which a variable is declared and instantly given its initial value. Three illustrations of declaration and initialization are as follows:

    int numStudents = 23;
    Ship argo = new Ship();
    Student[] students = new Student[numStudents];

Instance variables which are not explicitly initialized whenever they are declared contain a default initial value which is suitable to their kind. Uninitialized local variables contain an undefined initial value.

   Related Questions in Programming Languages

  • 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 : Main function of context switching What

    What is the main function of context switching?

  • Q : Define Application Application : It is

    Application: It is frequently used, simply as a synonym for the program. Though, in Java, the word is particularly employed of programs with a Graphical User Interface (GUI) which are not applets.

  • Q : Write a program that initializes an

    Write a program that initializes an integer array a[20] with values {0, 1, 2, 3, ...18, 19 - once each} then scrambles them up and prints the values in random order. For example: 19 2 3 8 11 1 4 17 7 15 9 0 16 12 18 13 5 6 10 14    

  • Q : Define the term Pixel Define the term

    Define the term Pixel: It is a `picture element' - usually a colored dot on a screen.

  • Q : Scalability aspects of a Java PathFinder

    Scalability of program model checkers such as JPF encompasses two aspects: How large a program can be model checked, and Once a defect has been detected, how readily meaningful debugging informati

  • Q : Define the term Internet Define the

    Define the term Internet: It is a global network of numerous interconnected networks.

  • Q : Simulation of artifacts in CT using

    How is Simulation of artifacts in CT is done utilizing MATLAB?

  • Q : Explain Semantic error Semantic error:

    Semantic error: It is an error in the meaning of program. A statement might contain no syntax errors, however might still break the rules of Java language. For example, when ivar is an int variable, the shown statement is syntactically correct

  • Q : Define the term Static type Define the

    Define the term Static type: It is the static type of an object is the declared type of the variable employed to refer to it.