Skip to content
This repository was archived by the owner on May 26, 2024. It is now read-only.

Commit a033951

Browse files
authored
Update Test.java
Indentation changes
1 parent 2f1fd8b commit a033951

File tree

1 file changed

+5
-4
lines changed
  • Java Fundementals/Day 48/0-First java program

1 file changed

+5
-4
lines changed

Java Fundementals/Day 48/0-First java program/Test.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
public class Test {
66
public static void main(String[] args) {
7-
String name ="Sara";
8-
int age =23;
9-
String homeTown="Tulkarem";
10-
System.out.println("My name is: " + name +'\n' + "I am " + age +'\n'+ "My hommetown is " +homeTown);
7+
String name ="Sara";
8+
int age =23;
9+
String homeTown="Tulkarem";
10+
String formattedString = String.format("My name is: %s, I am %d years old. My hometown is %s", name, age, homeTown);
11+
System.out.println(formattedString);
1112
}
1213
}

0 commit comments

Comments
 (0)