Handling return type of methods

The method name is ListEvent.The purpose of this method is to return all the avilable events in the database with the necessary info wid it.The argument is a string which is the eventname and this methos ListEvent must return two string data which is the noOfSeats (int) and Price(double).What must be the return type of the method?..and how must i traverse to display the data into a textField?

Message was edited by:

Anu-java

[447 byte] By [Anu-javaa] at [2007-10-3 2:39:34]
# 1

> The method name is ListEvent.

And why doesn't it comply to the naming conventions?

>The purpose of this

> method is to return all the avilable events in the

> database with the necessary info wid it.The argument

> is a string which is the eventname and this methos

> ListEvent must return two string data which is the

> noOfSeats (int) and Price(double).What must be the

> return type of the method?

Pick whatever suits you most.

> ..and how must i traverse

> to display the data into a textField?

Depends on what you pick as the return type.

Sorry, I won't do your homework.

CeciNEstPasUnProgrammeura at 2007-7-14 19:37:49 > top of Java-index,Java Essentials,New To Java...
# 2
i wanted to know..wat must be the return type wen u want a method to return an int and double at the same time
Anu-javaa at 2007-7-14 19:37:49 > top of Java-index,Java Essentials,New To Java...
# 3
A method can only return ONE thing (primitive or object). If you need to return an int and a double then create your own class that can store an int and a double and return that.Or you have a bad design!
floundera at 2007-7-14 19:37:49 > top of Java-index,Java Essentials,New To Java...
# 4
> Or you have a bad design!The fact that the method is called "ListEvent" when it doesn't list an event already demonstrates that.
DrClapa at 2007-7-14 19:37:49 > top of Java-index,Java Essentials,New To Java...