fork download
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. /**
  7.  *
  8.  * @author Damien
  9.  */
  10. public class testClass implements Runnable{
  11. public int quantity;
  12. public double price;
  13.  
  14. public testClass(int quantity, double price) {
  15. this.quantity = quantity;
  16. this.price = price;
  17. }
  18.  
  19. public void outVars(){
  20. System.out.println(this.quantity);
  21. System.out.println(this.price);
  22. }
  23. public void outVarsMult2(){
  24. System.out.println(this.quantity*2);
  25. System.out.println(this.price*2);
  26. }
  27. public void outVarsMult3(){
  28. System.out.println(this.quantity*3);
  29. System.out.println(this.price*3);
  30. }
  31.  
  32.  
  33. public void run(){
  34. outVars();
  35. outVarsMult2();
  36. outVarsMult3();
  37. }
  38.  
  39. }
  40.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty