fork download
  1. class getdata
  2. {
  3. public int data(int a,int b){
  4. int c;
  5. c=a+b;
  6. System.out.println("The c value is %d"+c);
  7. return c;}
  8. public String printdata(String ne){
  9.  
  10. System.out.println("the name is %s"+ ne);
  11. return heren;
  12. }
  13. public static void main(String args[])
  14. {
  15. getdata d = new getdata();
  16. d.data(1,2);
  17. d.printdata("Kank");
  18. }
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:11: cannot find symbol
symbol  : variable heren
location: class getdata
	return heren;
	       ^
1 error
stdout
Standard output is empty