Variant return type in Java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Variant return type in Java

  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Unhappy Variant return type in Java

    Hi,
    I'm trying to create a function with Variant return type in java like:
    ReadRecord(1) return an int
    ReadRecord(2) return a String

    Is it possible in java or do i have to use something else.....? Thanks.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Look at the Scanner class. Do you know your file layout, so that the first part of the record will always be an int and the second will always be a String?

Similar Threads

  1. Replies: 2
    Last Post: 06-14-2006, 04:16 PM
  2. Generic Java, type not bounded
    By synckewl in forum Java
    Replies: 1
    Last Post: 09-27-2005, 10:12 PM
  3. learning c# very confusing.
    By Mike Tsakiris in forum .NET
    Replies: 11
    Last Post: 10-04-2002, 06:32 PM
  4. App Object
    By Rob Teixeira in forum .NET
    Replies: 15
    Last Post: 05-31-2002, 04:30 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center