I have two classes and trying to call a method from one class to another but getting this error.
Here is the class having the method:
import java.util.*;
import java.io.*;
public class MethodContainer{
public void printer(int ho)
{
System.out.println( "This works"+ho);
}
}
and here is the main class
import java.util.*;
import java.io.*;
public class callMethod{
public static void main(
String args[])
{
int ho = 100;
MethodContainer methodReceiver = new MethodContainer();
methodReceiver.printer(ho);
}
}
I am getting these errors:
cannot resolve symbol
symbol : class MethodContainer
location: class callMethod
MethodContainer methodReceiver = new MethodContainer();
cannot resolve symbol
symbol : class MethodContainer
location: class callMethod
MethodContainer methodReceiver = new MethodContainer();
Help needed.
Thanks.