Two Laptop Bag*
The moose likes Beginning Java and the fly likes why this program does not run !!!! your kind help !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why this program does not run !!!! your kind help !!" Watch "why this program does not run !!!! your kind help !!" New topic
Author

why this program does not run !!!! your kind help !!

Ammar Salem
Ranch Hand

Joined: Dec 29, 2007
Posts: 60
hi, i have been trying to run this program code but the error ""Exception in thread "main" java.lang.NoClassDefFoundError:FuncCal""
and here is the code:

class FuncCall {

public static void funct1 () {
System.out.println ("Inside funct1");
}

public static void main (String[] args) {
int val;

System.out.println ("Inside main");

funct1();

System.out.println ("About to call funct2");

val = funct2(8);

System.out.println ("funct2 returned a value of " + val);

System.out.println ("About to call funct2 again");

val = funct2(-3);

System.out.println ("funct2 returned a value of " + val);
}

public static int funct2 (int param) {
System.out.println ("Inside funct2 with param " + param);
return param * 2;
}
}

with respect,


****************************<br />For Some Dreams.....<br />One Lifetime Is Not Enough.<br />****************************
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Ammar Salem:
"Exception in thread "main" java.lang.NoClassDefFoundError:FuncCal"

You have a typo. It's FuncCall -- not FuncCal.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Ammar Salem
Ranch Hand

Joined: Dec 29, 2007
Posts: 60
Thank you, that really worked, i didn't really notice !!
thank you again Marc
 
Don't get me started about those stupid light bulbs.
 
subject: why this program does not run !!!! your kind help !!
 
Similar Threads
Difference between two programs
please explain
Passing value from one method to the next
s this , a true example of pass by value ?
help