This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example; | |
public class Coche extends Vehiculo { | |
private String motor; | |
private String combustible; | |
private int puertas; | |
private double consumo; | |
public String getMotor() { | |
return motor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example; | |
public class Bicicleta { | |
String sillin; | |
String manillar; | |
public String getSillin() { | |
return sillin; | |
} | |
public void setSillin(String sillin) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example; | |
public class Vehiculo { | |
String marca; | |
String modelo; | |
int anyo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example; | |
public class Coche extends Vehiculo { | |
String motor; | |
String combustible; | |
int puertas; | |
double consumo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Coche { | |
String marca; | |
String modelo; | |
int anyo; | |
String motor; | |
String combustible; | |
int puertas; | |
double consumo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Coche { | |
public String marca; | |
public String modelo; | |
public int anyo; | |
public String motor; | |
public String combustible; | |
public int puertas; | |
public double consumo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Coche { | |
private String marca; | |
private String modelo; | |
private int anyo; | |
private String motor; | |
private String combustible; | |
private int puertas; | |
private double consumo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
String s1 = "desde0.com"; | |
System.out.println("Clasic Form with (+): " + "www.java" + s1); | |
StringBuilder s2 = new StringBuilder("www.java"); | |
s2.append("desde0.com"); | |
System.out.println("StringBuilder: " + s2); | |
StringBuffer s3 = new StringBuffer("www.java"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.controller; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.PathVariable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.time; | |
import java.sql.Timestamp; | |
public class Time { | |
public static Timestamp getTime() { | |
return new Timestamp(System.currentTimeMillis()); | |
} | |
} |