CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011
    Posts
    8

    SimpleList Question

    Im having trouble figuring out list, I have a question regarding the following to lines

    private SimpleList<String> merge (SimpleList<String> x, SimpleList<String> y)


    private SimpleList<Integer> searchLine(String line, String s)


    I just was wondering what is the difference when it says (SimpleList <String>) & then When it just says (String). When SimpleList is not there what can I now do or not do?

    2nd Question the after Private SimpleList what is the word in the <> referencing regarding my code?

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: SimpleList Question

    I just was wondering what is the difference when it says (SimpleList <String>) & then When it just says (String).
    They are different classes.

    SimpleList <String> = Assuming SimpleList implements the List interface, this is a List class whose contents are Strings.

    String = The String class.

    what is the word in the <> referencing
    This is generics. Read this tutorial
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured