dcsimg
Hi friends I have doubt in set and get methods
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Govindaraj_Ponnusamy
Posted On:   Monday, August 1, 2005 08:20 AM

Dear Friends, I written one Set and get method in my program. In my set method I retrived data from the database and I assigend that value to the local variable, and I returned that value to the get method. If the value is one it's coming corretly if it's more than one it gives the latest value but I want all the values to return in the get mehtod. private static double durationDays1 = -1;//local varriable variable durDays retrives updated data from Dbase In the set method I got the all updated values .but in the get method I got only one latest value. public void setDuration1(double durDays) { durationDays1= durDays; System.out.println(durationDays1); // here I got all the values   More>>

Dear Friends, I written one Set and get method in my program. In my set method I retrived data from the database and I assigend that value to the local variable, and I returned that value to the get method. If the value is one it's coming corretly if it's more than one it gives the latest value but I want all the values to return in the get mehtod.

private static double durationDays1 = -1;//local varriable
variable durDays retrives updated data from Dbase In the set method I got the all updated values .but in the get method I got only one latest value. public void

setDuration1(double durDays)

{

durationDays1= durDays;

System.out.println(durationDays1);

// here I got all the values.


}


public double getDuration1()

{


return durationDays1;


}




plz help me to get all the values in the gget method. Advanced Thank to you.

   <<Less

Re: Hi friends I have doubt in set and get methods

Posted By:   Jani_Kaarela  
Posted On:   Tuesday, August 2, 2005 04:51 AM

Re: Hi friends I have doubt in set and get methods

Posted By:   Almagest_FUTT  
Posted On:   Monday, August 1, 2005 10:17 AM

Yes... you already said all that.

Are you aware your post is anything but understandable ?


"You have written one set and one get method"? Cheerio, i'm proud o' ya! But you know that a method's name is not part of the method's functionality, that a file's name's extension is no property of the file itself and that there is no such thing as a god, do you ?


Anyway. I suppose you should declare your variable durationDays1 non-static (only private double durationDays1 = -1;).

About | Sitemap | Contact