I have problem with this code, it is throwing error on g.get(): this particular line
String str = g.get(); // "HI GENEVIVE"
This is the code
class genevive {
String get( ) {
return "Hi Genive";
}
}
public class Test1 {
public static void main(String[] args) {
Genive g = new Genive();
String str = g.get(); // "HI GENEVIVE"
System.out.println(str);
}
}