Results 1 to 4 of 4
Thread: Please help with methods
- 04-08-2011, 04:31 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 2
- Rep Power
- 0
Please help with methods
Hey guys,
I am new to java and I am creating an applet for an assignment for my university course.
I am trying to do some calculations inside a method but I am getting errors:
How do I do all three calculations??? It only lets me do one calculation inside the method.private double Calculate_Results ()
{
return (ElectricityUsedPerYear = SunlightHours * DaysInYear * OutputCapacity / 1000.0);
(ElectricityValue = ElectricityPrice * ElectricityUsedPerYear);
(Efficiency = OutputCapacity / (1000.0 * ProductSize) * 100.0;)
}// private double Calculate_Results ()
Thanks,
pagunston
- 04-08-2011, 04:34 AM #2
Member
- Join Date
- Apr 2011
- Posts
- 2
- Rep Power
- 0
P.S anyone know how to disable smile in my code?
- 04-08-2011, 04:49 AM #3
In future if you get errors then include them in your post.
A method can only return one thing.
If you place your code inside code tags instead of quote tags then it will not interpret the smilies. Place [ code ] before and [ /code ] after your code (without the spaces).
-
Similar Threads
-
Trouble with static methods and boolean equals() methods with classes
By dreamingofgreen in forum New To JavaReplies: 8Last Post: 04-16-2012, 11:00 PM -
methods
By blueduiker in forum New To JavaReplies: 12Last Post: 02-09-2010, 03:50 PM -
Help with get and set methods
By shroomiin in forum New To JavaReplies: 4Last Post: 11-23-2009, 08:04 PM -
Help with Methods Please :-)
By jkhamler in forum New To JavaReplies: 22Last Post: 11-10-2009, 08:54 PM -
How to get methods to see variables in other methods
By ejs7597 in forum New To JavaReplies: 4Last Post: 04-03-2009, 06:36 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks