Variable Java en String
String string = String.format("A string %s", aVariable);
Helpless Hippopotamus
String string = String.format("A string %s", aVariable);
String newString = new String("Hello World");
class Main {
public static void main(String[] args) {
// create strings
String first = "Java";
String second = "Python";
String third = "JavaScript";
// print strings
System.out.println(first); // print Java
System.out.println(second); // print Python
System.out.println(third); // print JavaScript
}
}