--%>

Explain Constructor

Constructor: A constructor is automatically called whenever an instance of its class is formed. A constructor always has similar name as its class, and encompass no return type. For example:

public class Ship {
    public Ship(String name){
        ...
    }
    ...
}

The class with no explicit constructor consists an implicit no-arg constructor that takes no arguments and contains an empty body.

   Related Questions in Programming Languages

  • Q : Explain script recorded over tested web

    Why is the script recorded over the tested web pages not playback correctly?

  • Q : Define Homology Modeling In Structural

    Homology Modelling is a process in which models are generated. The generated models may be conceptual or graphical or/and mathematical.So, we have different methods, tools and techniques for all kinds of modeling.Modelling methods are broadly classifi

  • Q : Define Anonymous object Anonymous

    Anonymous object: An object formed without an identifier. They are generally formed as array elements, actual arguments or method outcomes. For example:     private Point[] vertices = { &n

  • Q : What is Classpath Classpath : The path

    Classpath: The path searched by interpreter and compiler for class definitions. The class path might be set by a command-line argument to either, or through an environment variable.

  • Q : Perform Exception Handling with

    On occasion, some of Brewbean’s customers mistakenly leave an item out of a basket already checked out, therefore they create a new basket containing the missing items. Though they request that the baskets be combined and hence they are not charged extra shippin

  • Q : Define the term Identifier Define the

    Define the term Identifier: It is a programmer-defined name for a method, variable, class and interface.

  • Q : Program and process Explain the term

    Explain the term program and process?

  • Q : System Architecture for Windows

    Tell me about the System Architecture for Windows Programming?

  • Q : Define Certificates Define Certificates

    Define Certificates: They are digital documents attesting to the binding of a public key to an individual or another entity. They permit verification of the claim which a given public key does in fact fit in to a given individual. The certificates hel

  • Q : Web based programming homework

    Component 2 Task b: Task Description Computing students at this University who study on undergraduate courses require a method to view their module marks and to see how they are progressing on the module. You have been asked to develop a web