Results 1 to 3 of 3
Thread: help with simple program in java
- 08-04-2007, 04:56 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 41
- Rep Power
- 0
help with simple program in java
I can't figure out what the problem is
Can you help me?
the method :Java Code:public class test1 { public static void main (String[] args) { int a = 5; int b = 3; int c = 0; double result= sub(int a, int b, int c); }
The error:Java Code:public double sub(int a, int b, int c); { double calc = ((a-b)/b-c)-a return calc; }
Java Code:interest.java:9: '.class' expected sub(int a, int b,int c); ^
- 08-04-2007, 10:02 PM #2
There is an errant semi–colon at the end of this method signature.public double sub(int a, int b, int c);
- 08-06-2007, 08:03 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 41
- Rep Power
- 0
Similar Threads
-
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM -
Peculiarty in code of simple program...
By Kreuz14 in forum New To JavaReplies: 4Last Post: 01-23-2008, 03:27 AM -
Simple java
By abhiN in forum New To JavaReplies: 1Last Post: 01-16-2008, 10:13 AM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM -
help with simple java program
By leonard in forum New To JavaReplies: 3Last Post: 07-30-2007, 09:40 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks