The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Need help with calling methods from classes - Java Assignment

I'm working through a Java assignment for school, and I've hit a road block about half way through it. The part I'm up to is asking me to add a method to a seperate .java file (MyString.java in this case) and then to call that method in my main program file. Don't get too confused with how the assignment is meant to work or anything, I only really need help with the code to call that method in my main file. I'm going to show you the relevant areas of code in both files and I'm hoping someone can help me out with the code to call that method from the class MyString.java.

Basically what that's going to do is take the first three characters from the lastName field and merge them with a random number between 1200 - 1299 to create an Employee ID.

My problem is I really have no idea how to call this method in my main file below:

publicstaticvoid createEmpID(){//JOptionPane.showMessageDialog(null,"In (2) createEmpID()"); <-- This is just filler text, I need the code for this part that will call the previously mentioned method.}

I hope I've made this as clear as possible but if you need any further clarification let me know and I'll respond as soon as possible.

Thanks for taking the time to read my post and I hope to hear from someone soon.