Results 1 to 3 of 3
- 05-07-2010, 10:03 PM #1
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
The method myFunction(String) is undefined for the type
Ok I am trying to create a very simple class to see how it all works, but I keep running into issues.
The class that is being called is below. It is very simple just to try to get it working.
Below is the code I am using to try to call the function.Java Code:public class Hmac { public String myFunction(String encryptionKey){ return "Hi"; } }
Everytime I call the function I get this:Java Code:String encryptionKey = "eUSMozLGp9fl03gZ"; Hmac h = new Hmac(); String newResult = h.myFunction(encryptionKey);
The method myFunction(String) is undefined for the type Hmac
30:
31: Hmac h = new Hmac();
32:
33: String newResult = h.myFunction(encryptionKey);
If I removed the "encryptionkey" argument and modify the class to not take any arguments it works, but when I just try to pass an argument in it does not work.
Any help would be great as I am totally stumped!
Thanks
Jason
-
Do you have more than one class named Hmac? Have you recompiled all files, including the Hmac.java file?
- 05-07-2010, 11:02 PM #3
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
The constructor Person(String, String, Date) is undefined
By fh84 in forum New To JavaReplies: 7Last Post: 11-03-2009, 02:18 AM -
Static String Return Type
By Java_Developer in forum New To JavaReplies: 17Last Post: 10-03-2009, 06:07 PM -
[SOLVED] [newbie] The method GBC(int, int) is undefined for the type FontFrame
By jon80 in forum New To JavaReplies: 0Last Post: 05-27-2009, 04:39 PM -
[SOLVED] Cast string type to int type
By GilaMonster in forum New To JavaReplies: 9Last Post: 09-17-2008, 10:43 AM -
dentify the language type from a given String.
By vaskarbasak in forum Advanced JavaReplies: 18Last Post: 07-31-2008, 10:29 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks