Any reasons to why my reference idea cannot call to the getDescription method? The printIDEA is in the Solutions class and not the IDEA class.
By the way, if you can, can you briefly summarize what the methods are doing? Is the printIDEA method calling to the getDescription method to return the String value and print it out in the main method? Thanks!
package com.codegym.task.task06.task0617;
/*
Notepad for new ideas
*/
public class Solution {
public static class Idea {
String a;
public String getDescription(){
return "string";
}
}
public static void printIdea(Idea idea){
System.out.println(idea.getDescription);
}
public static void main(String[] args) {
printIdea(new Idea());
}
//write your code here
}