Answers for "how to initialize on strint variable to other string variable in java"

0

how to initialize a string in java

Scanner sc = new Scanner(System.in);
String str = sc.next();
Posted by: Guest on May-22-2021
0

java use variables inside strings

Java 15+
String foo = "foo";
String bar = "bar";

String str = "First %s, then %s".formatted(foo, bar);
Posted by: Guest on June-05-2021

Code answers related to "how to initialize on strint variable to other string variable in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language