Java

Moderators: zibadian
Number of threads: 7818
Number of posts: 18218

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
vector function in java Posted by weitech on 2 Apr 2006 at 3:02 AM
How do I create or declare a function type Vector? Could some one show me some examples.
Report
Re: vector function in java Posted by zibadian on 2 Apr 2006 at 3:25 AM
: How do I create or declare a function type Vector? Could some one show me some examples.
:
Here are some examples:
  public Vector getShipDirection()
  {  
    Vector d = new Vector(2);
    // Fill d with information
    return d;
  }

  public Vector getBooks()
  {
    return new Vector(bookCollection);
  }

  private Vector calcVectorSum(Vector v1, Vector v2)
  {
    // Perform calcution and return result
  }

More info can be found on: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Vector.html
Report
Re: vector function in java Posted by weitech on 2 Apr 2006 at 4:07 AM
Hey Thanks

That helps me alot.

: : How do I create or declare a function type Vector? Could some one show me some examples.
: :
: Here are some examples:
:
:   public Vector getShipDirection()
:   {  
:     Vector d = new Vector(2);
:     // Fill d with information
:     return d;
:   }
: 
:   public Vector getBooks()
:   {
:     return new Vector(bookCollection);
:   }
: 
:   private Vector calcVectorSum(Vector v1, Vector v2)
:   {
:     // Perform calcution and return result
:   }
: 

: More info can be found on: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Vector.html
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.