Results 1 to 3 of 3

Thread: Parameters!

  1. #1
    hawk-dc is offline Member
    Join Date
    Nov 2013
    Posts
    20
    Rep Power
    0

    Default Parameters!

    Can somebody help with this: how to get an access to the method with a parameter of class type variable, lets say: public void insert(Record newRecord, int pos)?

    Thanks!
    Last edited by hawk-dc; 02-19-2014 at 05:37 AM.

  2. #2
    ankurt is offline Member
    Join Date
    Feb 2014
    Posts
    11
    Rep Power
    0

    Default Re: Parameters!

    If I understood it correctly, you want to call this method using the instance of the class in which this method is defined?

    lets say object1 is the instance of the class, so we call the method as
    object1.insert(parameter 1,parameter2);

    let me know if it solves the purpose.

  3. #3
    AlexGraal is offline Señor Member
    Join Date
    Jan 2014
    Posts
    161
    Rep Power
    0

    Default Re: Parameters!

    Well that method is non-static.

    To gain access to that method, you'd need to create an instance of the class that it is located in.

    Java Code:
    classname x = new classname(parameters of the constructor);
    x.insert(parameter 1, parameter2);

Similar Threads

  1. Parameters...
    By hawk-dc in forum New To Java
    Replies: 3
    Last Post: 11-14-2013, 09:44 PM
  2. Replies: 10
    Last Post: 01-24-2012, 10:02 PM
  3. Replies: 5
    Last Post: 11-21-2010, 02:08 PM
  4. Parameters
    By MIA6 in forum New To Java
    Replies: 2
    Last Post: 12-22-2009, 01:25 PM
  5. How to add two other parameters?
    By albi_87m in forum Advanced Java
    Replies: 3
    Last Post: 05-18-2009, 01:25 PM

Posting Permissions

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