Results 1 to 4 of 4

Thread: Constructor

  1. #1
    Angeli is offline Member
    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0

    Default Constructor

    How to use a constructor to create an object with names and marks??

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,702
    Rep Power
    8

    Default Re: Constructor

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Angeli is offline Member
    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0

    Default Re: Constructor

    Quote Originally Posted by KevinWorkman View Post
    so if I want to create a constructor for student marks and name,

    it would be as follows

    student mystudent = new student ("Dave", "Spring", 10, 10, 20, 30);

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,702
    Rep Power
    8

    Default Re: Constructor

    Quote Originally Posted by Angeli View Post
    so if I want to create a constructor for student marks and name,

    it would be as follows

    student mystudent = new student ("Dave", "Spring", 10, 10, 20, 30);
    What happened when you tried that?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 5
    Last Post: 08-11-2012, 09:50 AM
  2. Java - Constructor Method versus Constructor
    By brocksoffice in forum New To Java
    Replies: 1
    Last Post: 08-01-2012, 09:17 AM
  3. Replies: 5
    Last Post: 12-14-2011, 01:47 PM
  4. Replies: 0
    Last Post: 12-19-2007, 09:10 AM
  5. Replies: 0
    Last Post: 12-19-2007, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •