fork download
  1. /**
  2.  * @author Damien
  3.  */
  4.  
  5. //Testing
  6. public class testing {
  7. public static void main(String args[]){
  8.  
  9. testClass test = new testClass(1, 3 , 2.5);
  10. adding(test);
  11. test.run();
  12. testClass2 test2 = new testClass2(1, 3 , 2.5);
  13. test2.run();
  14.  
  15.  
  16. }
  17.  
  18. public static void adding(parentClass obj){
  19. obj.price = 10.5;
  20. obj.quantity=15;
  21. }
  22. }
  23.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty