fork download
  1. Q. What is the oupput of the following programme?
  2. public class Test { /**
  3.   * @param args
  4.   */
  5. private String myName;
  6. private String lastName;
  7.  
  8. public Test(String myName,String lastName) {
  9. // TODO Auto-generated constructor stub
  10. System.out.println("Hey,I am parameterized,so I am called!");
  11. }
  12.  
  13. public Test() {
  14. // TODO Auto-generated constructor stub
  15. System.out.println("Hey,I am default,so any how I am always called!");
  16.  
  17. }
  18. public static void main(String[] args) {
  19. // TODO Auto-generated method stub
  20.  
  21. Test test = new Test("soham","batavia"); } }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
Q. What is the oupput of the following programme?
^
1 error
stdout
Standard output is empty