Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: largest object in an array

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default largest object in an array

    Write a method that returns the largest object in an array of objects. The method signature is:

    public static Object max(Comparable[] a)

    All the objects are instances of the Comparable interface. The order of the objects in the array is
    determined using the compareTo method.

    Write a test program that creates an array of ten strings, an array of ten integers,

    and an array of ten dates, and finds the largest string, integer, and date in the

    arrays.

    please HELP!!!!!


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: largest object in an array

    What's your question? What have you tried? Where are you stuck?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: largest object in an array

    Define largest!

    Is "anaconda" larger than "bee"?
    Improving the world one idiot at a time!

Similar Threads

  1. Largest object in an array of objects
    By Noct in forum Java Theory & Questions
    Replies: 2
    Last Post: May 16th, 2013, 12:49 AM
  2. Finding the largest object in an array
    By ashl7 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 12th, 2013, 06:57 PM
  3. 3x3 array find largest number
    By joecan2010 in forum Loops & Control Statements
    Replies: 1
    Last Post: November 27th, 2012, 11:56 PM
  4. Reading from ResultSet to Object and from object Object Array
    By anmaston in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 7th, 2011, 06:11 AM
  5. finding the largest object help
    By nickypass in forum Object Oriented Programming
    Replies: 4
    Last Post: October 16th, 2010, 05:48 PM