Results 1 to 4 of 4
  1. #1
    kira137 is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default what is difference between int and intlist?

    private final IntList coefficients;

    my prof gave me this code in assignment and I'm having trouble understanding what that line does..

    is that an array for coefficients? or just fancy way of writing an int?

    thank you in advance

  2. #2
    CodesAway's Avatar
    CodesAway is offline Senior Member
    Join Date
    Sep 2009
    Location
    Texas
    Posts
    238
    Rep Power
    5

    Default

    Java Code:
    private final IntList coefficients;
    Quote Originally Posted by kira137
    my prof gave me this code in assignment and I'm having trouble understanding what that line does..

    is that an array for coefficients? or just fancy way of writing an int?

    Neither, IntList is a class. Now, based on it's name, IntList could be a wrapper for List<Integer>, but that's not a guarantee, just a best guess on my part. Instead, you should check if your professor included an IntList class in the notes, or ask if you cannot find such a class.
    CodesAway - codesaway.info
    writing tools that make writing code a little easier

  3. #3
    kira137 is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default

    ah.. yes there is class called IntList. I thought intList was just a weird way of saying int.
    But I have another question, what does the name coefficent do?
    because there isn't a method called coefficient inside intList..

    is it just naming intList to a different name..?

  4. #4
    CodesAway's Avatar
    CodesAway is offline Senior Member
    Join Date
    Sep 2009
    Location
    Texas
    Posts
    238
    Rep Power
    5

    Default

    Quote Originally Posted by kira137 View Post
    ah.. yes there is class called IntList. I thought intList was just a weird way of saying int.
    But I have another question, what does the name coefficent do?
    because there isn't a method called coefficient inside intList..

    is it just naming intList to a different name..?
    First, to clarify, Java class names, variables, method names, etc. are case-sensitive. So, IntList and intList are not the same.

    Second, coefficients is an instance of an IntList. You could give it any name you choose. The name, usually, is something meaningful, so that it explains it's functionality. For example, the name coefficients could mean it stores the coefficients for a polynomial equation.

    From the appearance, coefficients is a private field in a class.
    CodesAway - codesaway.info
    writing tools that make writing code a little easier

Similar Threads

  1. what is the difference
    By ron87 in forum New To Java
    Replies: 5
    Last Post: 01-04-2011, 04:31 PM
  2. What is the difference between
    By arnab321 in forum New To Java
    Replies: 2
    Last Post: 01-19-2009, 04:49 AM
  3. what is the difference between jsp and jsf?
    By makpandian in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 12-31-2008, 05:55 PM
  4. difference
    By nishant in forum New To Java
    Replies: 2
    Last Post: 09-17-2008, 06:04 PM
  5. Difference between ASP and JSP
    By barney in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 07:15 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
  •