Results 1 to 4 of 4
  1. #1
    alfarida is offline Member
    Join Date
    Nov 2010
    Posts
    16
    Rep Power
    0

    Default Java code giving error

    Hi Mates

    I am getting error in the code below at line 8. error is
    ')' expected at line 8 .i am using JBuilder editor.

    the dycryptedkey() method returns a boolean value and takes 3 arguments as shown
    i have all these variables decleared in the class
    can you tell me what can be the problem.

    1.public void testing() throws ParseException
    2. {
    3 this.bb=bb ;
    4 this.period=licfor;
    5 this.lickey=key;
    6 this.clientname =name;
    7 loc=new LicClient();
    8 bb=loc.dycryptedKey(String key , String name, int licfor);
    9 if (bb == false)
    10 {
    11 System.out.println(bb);
    12 }else { System.exit(0);
    13 }
    14 }

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by alfarida View Post
    8 bb=loc.dycryptedKey(String key , String name, int licfor);
    You don't define the types of the actual parameters; make that line:

    Java Code:
    bb=loc.dycryptedKey(key, name, licfor);
    kind regards,

    Jos

  3. #3
    alfarida is offline Member
    Join Date
    Nov 2010
    Posts
    16
    Rep Power
    0

    Default

    types of parameters
    the loc.dycryptedKey(String key , String name, int licfor); method returns the boolean type and takes 3 arguments (string ,string and int ).
    period,clientname and lickey are int,string and string types and are declared in the class.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by alfarida View Post
    types of parameters
    the loc.dycryptedKey(String key , String name, int licfor); method returns the boolean type and takes 3 arguments (string ,string and int ).
    period,clientname and lickey are int,string and string types and are declared in the class.
    Again: you don't define the types of the actual parameters in a method call.

    kind regards,

    Jos

Similar Threads

  1. Java code error!~ Please help
    By socboy6579 in forum New To Java
    Replies: 1
    Last Post: 10-15-2010, 03:47 AM
  2. Replies: 1
    Last Post: 07-23-2010, 02:42 PM
  3. Pls check why my code is giving a runtime error
    By Beginner in forum New To Java
    Replies: 3
    Last Post: 05-26-2010, 12:32 AM
  4. Replies: 5
    Last Post: 01-16-2010, 11:14 PM
  5. Giving Inputs to Java Applet
    By rasikh in forum Java Applets
    Replies: 2
    Last Post: 10-05-2009, 03:08 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
  •