Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public class Matematica {
  2.  
  3. /*
  4. * @param um
  5. * @param dois
  6. * return o maior dos dois numeros
  7. *
  8. */
  9. int maior(int um, int dois){
  10.  
  11. if( um > dois) {
  12.  
  13. return um;
  14. }
  15. else {
  16.  
  17. return dois;
  18.  
  19. }
  20. return 0;
  21.  
  22.  
  23. }
  24.  
  25. public class MatematicaTeste {
  26. public static void main(String[] args) {
  27.  
  28. }
  29. Matematica m = new Matematica();
  30. int maior = m.maior(10, 20);
  31. System.out.println(maior); //Da Error Aqui, alguém poderia me dizer porque?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement