Search:

Type: Posts; User: andbin

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    1,214

    Re: Someone help me understand construstors?

    Yes, in general a constructor serves at least for 2 things: to call, implicitly or explicitly, the "super" constructor (the constructor of a superclass) and eventually (this is up to you, and...
  2. Replies
    7
    Views
    1,214

    Re: Someone help me understand construstors?

    public class Book {
    private String title;

    public Book(String title) { // constructor
    this.title = title;
    }
    }
    This Book class has only 1 explicit constructor. It...
  3. Replies
    7
    Views
    1,214

    Re: Someone help me understand construstors?

    In few words: a constructor is a special member of a class that serves to construct and initialize the state of a newly created object.
    Every class has always at least 1 constructor. If the...
Results 1 to 3 of 3