Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Class A{public static void meth1(){System.out.println("Inside method 1");}}public class B{public static void main(String args[]){A a=new A();System.out.println(a.meth1());}}The above code gives a compile error.It says cannot use void.If the return type is not void then it compiles sucessfullywhat could be the reason?
Profile Answers by anandkolam Questions by anandkolam
Questions by anandkolam answers by anandkolam
Related Answered Questions
Related Open Questions