hey there,
i have problem with creating an objects from other classes.
for instance:
i have a greeter class;
public class Greeter
{
public String SayHello()
{
String message = "Hello World!";
return message;
}
}
and now if i try to create a Greeter object in my GreeterTest class
public class GreeterTest
{
public static void main(String[] args)
{
Greeter worldGreeter = new Greeter();
System.out.println(worldGreeter.SayHello());
}
}
i get 2 compiler errors:
GreeterTest.java:5: cannot resolve symbol
symbol : class Greeter
location: class GreeterTest
Greeter worldGreeter = new Greeter();
^
GreeterTest.java:5: cannot resolve symbol
symbol : class Greeter
location: class GreeterTest
Greeter worldGreeter = new Greeter();
^
2 errors
now i can compile the Greeter class just fine or even if i import other jdk classes....but it instances like this it won't compile
i have problem with creating an objects from other classes.
for instance:
i have a greeter class;
public class Greeter
{
public String SayHello()
{
String message = "Hello World!";
return message;
}
}
and now if i try to create a Greeter object in my GreeterTest class
public class GreeterTest
{
public static void main(String[] args)
{
Greeter worldGreeter = new Greeter();
System.out.println(worldGreeter.SayHello());
}
}
i get 2 compiler errors:
GreeterTest.java:5: cannot resolve symbol
symbol : class Greeter
location: class GreeterTest
Greeter worldGreeter = new Greeter();
^
GreeterTest.java:5: cannot resolve symbol
symbol : class Greeter
location: class GreeterTest
Greeter worldGreeter = new Greeter();
^
2 errors
now i can compile the Greeter class just fine or even if i import other jdk classes....but it instances like this it won't compile