Expand|Select|Wrap|Line Numbers
- /* first.java */
- package test;
- public class first
- {
- public static void display()
- {
- System.out.println(" welcome to java");
- }
- }
- /*second.java */
- package test;
- public class second
- {
- void check()
- {
- first.display();
- }
- }
I have stored above code in test folder. first.java is compiled successfully. When I am compiling second.java , I got the following error message
"cannot resolve the symbol variable first".
How to correct this error?