Advertisement
salejan

Método Sencillo en JAVA

May 25th, 2020
1,436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package clases_y_objetos;
  7.  
  8. /**
  9.  *
  10.  * @author JUAN
  11.  */
  12. public class Automovil {
  13.    
  14.     public void imprimirAuto(String marca, String color){
  15.         System.out.println("El automovil es marca: "+marca+" color: "+color);
  16.     }
  17.    
  18.     public static void main(String[] args) {
  19.        
  20.         Automovil autoUno = new Automovil();
  21.        
  22.         autoUno.imprimirAuto("Honda", "Negro");
  23.        
  24.     }
  25.    
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement