Results 1 to 2 of 2
  1. #1
    amtrbz is offline Member
    Join Date
    Jan 2011
    Rep Power

    Smile Java Generic Plz Help

    I have to write a following program....can any one suggest me how to start i am not use to with hava generics classes...
    Write a generic class called Gennow that has one type parameter. It should contain contains three methods, first() and second(), and third(), that return one of the three items respectively. Include a main method in the class which creates a Gennow object with a String type. The object should be created with three strings: "abc", "def", "ghi". Use the first(), second(), and third() methods to get each string from the Gennow object and print it. cann't use array...

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Destiny Islands
    Rep Power


    Have you tried anything? Are you making an effort on this? If so, start writing a program, then ask specific questions (ones that CAN be answered).

    Or do you just want someone to write it for you? 'Cause if that's the case, I have a perfect solution: More capable, accountable and affordable. Guaranteed. aren't free. ;)

Similar Threads

  1. Generic Array Creation - NOT ALLOWED?(java 5.0)
    By rkanagasikamani in forum Advanced Java
    Replies: 2
    Last Post: 12-15-2010, 03:45 PM
  2. Java Generic Container Question - please help!!!
    By zhoujackji in forum New To Java
    Replies: 3
    Last Post: 11-13-2010, 11:12 AM
  3. Generic Collections---Dysfuntional Java
    By beezerbutt in forum New To Java
    Replies: 6
    Last Post: 06-28-2009, 07:37 PM
  4. Generic methods
    By andre1011 in forum Advanced Java
    Replies: 7
    Last Post: 02-25-2009, 02:17 PM
  5. Generic Hashtables
    By ShoeNinja in forum New To Java
    Replies: 0
    Last Post: 12-04-2007, 10:43 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