keymasterviriya1150

Dr.Aziz

Nov 6th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. //2.1
  2. double temp=_height*_width;
  3. System.out.printf(2*temp);
  4. System.out.printf(temp);
  5. //2.2
  6. double getPayAmount()
  7. {
  8.     return _isDead ? deadAmount(); : _isSeparated ?  separatedAmount() : _isRetired ? retiredAmount : normalPayAmount;
  9. }
  10. //2.3
  11. static final double value=9.81
  12. double  potentialEnergy(double  mass,   double  height) {
  13.     return  mass    *   value   *   height;
  14. }
  15. //2.4
  16. public  String  _name=null;
  17. //2.5
  18. String[] row = {"Phuket","Bangkok"};
  19. //2.6
  20.  
  21. boolean cheakVal(int input)
  22. {
  23.     return input > 50 ? true : false;
  24. }
  25. int discount(int inputVal)  {
  26.         if(cheakVal(inputval))  
  27.             inputval-=2
  28.         return inputval;   
  29. }
Add Comment
Please, Sign In to add comment