Click to See Complete Forum and Search --> : Definetly a newbie question


kathrync2003
09-10-2007, 09:12 AM
Hi,

I just started in Java, so please excuse the junior nature of this question.

I need to call in a Java function in my web page that checks if a user
exists. There is a java file that I have to call in and there is a function
inside this file which is called 'GetUserID'.

I have no idea how to do this.
Any help would be appreciated.

thanks

aniseed
09-14-2007, 03:15 AM
Your problem description is ambiguous. Where are you checking if the user exists?

To answer part of your question, the java file having the function (called method in Java) should be compiled to a class file. Depending on whether the method is static or not, the syntax for the call will vary.

Static method:
TheClass.GetUserID();
Instance (non-static) method:
new TheClass().GetUserID();

It would be easier to help if you post some details.